Intent-centric (intent-solver pattern) architectures for fully decentralized dApps

ETHCC 5 · July 2022 · 23:29

Adrian Brink proposes an intent-solver architecture for decentralized applications. The speaker examines counterparty discovery and solving alongside state settlement, with examples including OpenSea, CoW Swap and rollup systems.

Speakers

Topics

From ETHCC 5, hosted by Ethereum France.

Transcript

great okay hello and welcome everyone thank you very much for coming today i'm adrian and i'm one of the co-founders of anoma and today i am briefly going to introduce anoma to you which is it's an architecture for it's a unified architecture for full stack decentralized applications and to begin with i'll start with sort of a historic context of how we got to today's state how we sort of what the first steps were and i think what sort of the next generation is going to look

like so when i think about how blockchains have evolved it obviously started with bitcoin and bitcoin really was the first generation and gave us scriptable settlement right like before then we didn't have decentralized applications and but bitcoin was very good at giving us scriptable settlement which allowed us to do things like we all of a sudden had cryptocurrencies and we had the first attempts to build things like colored coins or named namecoin um and interesting enough vitalik talks about this in the ethereum whitepaper that one of the reasons why ethereum came was in order to overcome the limitations of scriptable settlement on bitcoin right like to me bitcoin is always

this thing where we try to build applications but they were sort of clunky they were hard to build for namecoin for example you had to run a forked bitcoin client and in order to overcome some of these limitations that scriptable settlement presented we got programmable settlement and to me this is really the second generation of blockchain architectures and blockchain protocols because all of a sudden we went from this very limited scriptable settlement environment into this very comprehensive programmable settlement environment so instead of having colored coins we could now have ese 20s instead of having namecoin we got ens

but the big thing was that all of a sudden applications were possible that weren't possible beforehand right like there were some things that you couldn't build on bitcoin that now all of a sudden you could be building on ethereum and interesting enough like in the early days it really uh it wasn't clear what kind of applications would be built on programmable settlement this is sort of it was a general architecture to overcome some of the limitations of bitcoin that over time we explored a ton more and so we got like cool nfts soulbound tokens um amms things like the things we didn't think about when we thought of can we build this on bitcoin

um yeah because fundamentally the thing that programmable 7 allowed us to do it added a ton more expressivity into the base data settlement right and as a result we now have modern applications like taxes amms nft marketplaces but i think the important realization to me sort of in the last two years or so is that there are similar trade-offs here in the space where generally speaking when you nowadays have a dexa on am you or like an nft marketplace actually opens is a great example here which is you often have this problem that there are a lot of at least one web to a centralized component in the entire

stack right when you think of what openc actually does um users sign a message they send it to a centralized web 2 server because openc needs contemporary discovery in solving and so the centralized server at run by the openc team now does receive receives all these signed messages does some compute and then ends up submitting this to the settlement system and i have to say since like 2015 we really haven't evolved the underlying architectures we have gotten let's say programmable settlement plus plus we've made advances in civil resistance we've come a long way in terms of proof of stake we've got privacy advances uh advances in privacy privacy tech

we made bounds and leaps in terms of consensus and with like tandem and avalanche and eventually we all together with e2 and single slot finality but fundamentally all existing architectures are still this idea of it's just programmable settlement and it has the same fundamental limitations that we had in 2015 and we still have them nowadays but when you look at the applications that the current dapps that are being built they don't just need programmable settlement just like name coin and colored coins didn't just need scriptable settlement because fundamentally settlement is not sufficient settlement

works if the parties already know who they are already know with whom they want to settle and already know what they want to settle but many applications actually infrastructure for counterparty discovery which is generally speaking users don't have fully formed state transitions they have intents they have the idea that they currently have bitcoin and they'd rather hold some east so they want to they have the intent of selling a bitcoin for some eath this is not something that they can settle on chain they need to discover some counterparty that either holds the exact inverse or a number of counterparties with whom they can settle um and sometimes they also need help to agree with counterparties on what to

actually settle so you see this all over the place you see those with marketplaces you see this with quadratic public goods funding you see this with dials you even see those with rollups like when you think of what a rollup does a user takes a transaction oh like a user generates a message they sign that message they sent this to a single server generally called a sequencer or a approver that prover aggregates a bunch of these things does some compute and this compute then gets settled on some base layer right on some programmable settlement layer so this this is this general like i want to say design pattern which is people have intents they don't have transactions intense gets gossiped around solvers look at a bunch of these intents

they do some compute over an arbitrary number of intents and then they end up settling the net state transitions so what have been some attempts at solving counterparty discovery in recent years well sort of the trivial way to do this is to do this on a blockchain um this is what uniswap does this is what an amm does it treats ethereum the contract on ethereum as the single counterparty discovery and solving mechanism of course this is expensive because you're doing a bunch of compute over messages that honestly don't need global ordering and that don't need a total order

so it's kind of silly it's very expensive you could do this also for unchained order books but those are even more expensive than amms it's like amms are sort of the cheap answer to how do you do counterparty discovery using the current generation of blockchains the other answer is you centralize the entire thing and you run a single operator database uh where you open c does this they run a single web 2 server that does this the xerox relays do this flashbots does this too where everyone signs a thing they send it to flashbot flash flashback sends it to ethereum all the roll-up sequences whether there's a term optimism or stacknet do this and generally speaking we've tried to make sure that at least they can't steal

funds but they can of course always censor transactions and exclude people um and honestly they are by far the biggest weak points that we currently have because generally they're specific right like not anyone can run a stacknet solver which means that if you're worried about actually having censorship resistance tech you need to start worrying about how do you decentralize the sequences the um the provers how because if i was a regulator i would target like the single web 2 server that a private company called openc is running in new york um if i wanted to disrupt the nft uh trading experience right um some other examples were i mean dydx is doing this now so you can start

building app specific sovereign chains uh there are also tons of trade-offs there uh you the other important thing is between all these single operator databases um the signed message messages aren't composable as in i can't build a application an application that generalizes over the signed messages being sent to openc xerox and i don't know abba term at the same time because we don't have a standardized kind of power discovery in solving protocol that i can hook in to build my application so i want to talk a little bit here now about what i would consider sort of the third generation which is a

unified architecture for full-stack decentralized applications where it's not just programmable settlement but also decentralized counterparty discovery and distributed solving so in a nutshell anoma is an architecture it is a thing that you can deploy into many different security models you can deploy this as an l1 you can deploy this as an l one and a half to decentralize some dap or some roll up you can deploy this as an l2 to fully settle this on ethereum this is an architecture for how you build truly full stack decentralized applications um and in a nutshell it's an intent centric privacy preserving protocol for decentralized counterparty discovery solving an atomic multi-chain settlement

the two key design principles are intense centricity which i've already spoken a little bit about and homogeneous architecture and heterogeneous security models um and i'll start with the first one alright the second one talks more about the idea of being able to deploy this kind of architecture as an l2 so generally speaking users have intents they they express what they want not how to get it the problem is with current virtual machines effectively on whether this is solana near the evm it doesn't matter or avalanche it's all the same it's in those models users always express how

the compute should happen like no one writes i'm willing to hold zero bitcoin if i get 100 ethernet exchange people write i'm trusting this execution trace and all op codes that are being called can change the state um which results in like interesting bugs where if you have a broken proxy contract they can steal funds because as a user you never authorize what kind of state change you care about you authorize what execution flow you're okay with and so intents are just binding programmatic commitment program programmatic commitments to state preferences one of the nice things is once you have intents you can build a intent gossip network where you can have hundreds of millions

of these things because they're not settled necessarily all in consensus so you can have a hundred of 100 million of these intents just floating around and then you have solvers that look at 100 million intents and go which ones are compatible with each other which ones can i take put into a transaction and have settled on some programmable settlement layer and the important thing here is intents are composable as in the intents for openc and xerox can like be solved together at the same time right right this kind of intent centric design is necessary to enable decentralized counterparty discovery um and leads to this declarative paradigm for applications where instead of authorizing some specific execution

trace or execution flow of your program to achieve what you want you authorize the fundamental state change that you care about as a result you can do like on-demand roll-ups where you net out all the state changes because you look at 110s and go oh this only results in like two state updates on the underlying system because they're all net out and everyone gets what they want right this allows users to treat things as a black box architecture where users authenticate intents then some magic happens where the system figures out what other intents are there how do i combine them and then they're settled and as a like in the end users just need to check the updated state on whether their intent was settled or not okay i'm doing like slightly okay on

time right so what does this architecture look like of all this i won't go through this in depth i sort of run through this at a high level the first component on the left is counterparty discovery so users write intents that can be transparent shielded or private uh you also get massive privacy benefits with this kind of architecture which is quite nice the clients then [Music] create the intent sign them maybe they generate some associated knowledge proofs uh maybe you even use fhe if you want like fully private intents that's probably four years out at least uh fhe is hard then clients submit this to intent

gossip notes and there can be 100 million of these intents floating around solvers most likely specialize in specific subsets of intents solving is generally np-hard so it's very unlikely that someone can build a generalized solver because intents are just code as in like their ad runtime evaluated code right so once the solver has found a set of intents they can take it and create a transaction the important thing is transactions are generally front runnable this is relatively easy to solve nowadays by having a dkg protocol like favio where transaction where transactions are encrypted against a shared public key first then those encrypted transactions are

put into blocks there the ordering of those transactions is established and on the next block those transactions are then decrypted and executed uh this has the really nice benefit that no one can change the ordering anymore and hence no one can like front run or background or sandwich um right now you have the validates you have a finalized block you have a bunch of decrypted transactions now you go to the execution verification phase this depends very specifically on what your underlying program programmable settlement layer offers but generally you will have some sort of unified execution environment where you can trade transparent shield in private state and have some validity predicates to enforce some invariants that users care about right

so that's roughly intense as an idea now i'd like to go through homogeneous architecture heterogeneous security um why does this make sense let's start with this protocols can generally be benevolent monopolies as in we all benefit from having agreed upon protocols like tcpip or the cellular backbone because it allows us to use a unified infrastructure effectively like my phone not only works in europe it also works with the north american cellular backbone it works with the asian cellular backbone right but importantly security domains aren't monopolies because they can extract rent they can confiscate assets

and here the choice is really users should have a choice on what security domain they want to be in maybe the security maybe that choice from a user here is they want to be in global ethereum and that's a very valid choice some other people may care about being in a local security zone where like them and their 500 people in their small village run their own local commerce and they want to have most of their assets secured by their local security zone but importantly here it's not about saying which security zones people should opt into but rather we should give people choices in what security zones they can pick from right and this leads to this very neat separation of protocols and architectures from security models where we get the benefit of

composability and of unified architectures as well as the benefit from users being able to independently pick their own security models right this leads me to deployment patterns so something the enormous architecture can be deployed in several ways you can deploy this as a sovereign global l1 you can deploy this as the city of berlin can take this architecture and deploy it to settle all commas in berlin you can deploy this as an l1 and a half which is to decentralized l2s like to run decentralized sequences and decentralized provers you can or even as a to decentralize specific dap constructions or you can deploy this as

an l2 where everything gets settled in the entry ethereum so the first case is sort of where you only do intent gossip but sequence and settle elsewhere or the second one is where you use it to decentralize solvers and sequences and the third one really is where you use it to descend very specific applications without losing composability i think this is a really underestimated challenge nowadays that like every time a user sends a signed message to a web 2 server we're losing composability across the ecosystem because all of a sudden i can't build a new kind of application on top of this that takes advantage of the signed

messages from openc and assigned messages from xerox or you can deploy it as a local instance okay so what do dabs look like on a nova well they have an intent format format that says how to structure these intents so that everyone can do generalized compute over them you have solver algorithms that take in a set of intents and figure out which ones are composable and subtle and combinable and you have validity predicates which do some settlement and variants like we shouldn't be able to mint extra bitcoin if unless you're bitcoin or you shouldn't be able to go uh put my account into a negative state um and this kind of virtually integrated

architecture means that you get end-to-end security for life and liveness and privacy guarantees and the really cool thing is you get no vendor lock-in because your applications can be portable throughout over multiple security zones just like your phone is portable to most countries in the world so what can you build with our noma you can build existing dapps with full stack decentralization something like a fungible token swap 0x cal swap works really well the really nice thing is a normalized architecture it comes with programmable batching as well so you can temporarily encrypt these signed messages store them on chain and then

after 10 blocks go we now have a batch of these signed messages and use those use that to d and then at the same time decrypt them and then run the cow swap solver algorithms over this you can use this to build things like openc and decentralized openc i've spoken a bunch about the rollups and how to decentralize things like optimism and arbitrary you can also do this for quadratic funding where instead of having a sort of semi-trusted multi-sick that everyone sends money to for in the bitcoin case and then git coin redistributes this everyone has intents so who to fund and then you can have combine all these intents at the same time and then settle them as a complete batch on chain where all the right projects get the money that people

intended to give them yeah but just like when we went from bitcoin to ethereum we so over time discovered a ton of new applications that we didn't realize we could be building using these systems i expect that there are a bunch of cool things we can do in the future using this kind of generalized intent centric architecture for example private dials private second price auctions where there's actually this example where you use programmable threshold decryption where you keep all bids private until you want to reveal them and then no one has to worry about an economic game with a committed reveal scheme you can build private games and i think

what i'm most excited about is you can build multi-party multivariate private bartering protocols where it's like you can think of this as on-demand order books where i may want to trade like a crypto punk against a cryptokitty and some eth only if i only if the weather in paris is nice and i get some concert tickets in barcelona because in the end you're just trading arbitrary state transitions and code for each other oh and you can build on-demand runtime roll-ups at least where you net out the state changes oh yeah i'm doing final time um yeah cool um so that's the anoma architecture it's built by helix there's a lot more than the three of us

to this uh check out the entire team at helix.dev if you have questions at some point we also have a booth upstairs there are like physical white paper copies that you can check out uh that explains this probably way more coherently than i could do in these like 20 minutes so yeah thank you very much enormous unified architecture for full stack decentralization and [Applause] okay cool all right we have time for one question maybe two so what do you think is the timeline

before we can use anoma to deploy an optimistic wall up is there optimism or rb drama um i think timeline wise this is probably something where the intent centric architecture has become available early next year um so yeah it's soon let's say this way any other questions i think people are just taking a bunch of pictures not questions thank you very much you