Anoma - an intent-centric architecture for fully decentralized dApps with Adrian Brink

ETH Seoul 2022 · August 2022 · 26:55

Adrian Brink, co-founder of Anoma, presents an intent-centric architecture for fully decentralized applications. The talk traces blockchains from scriptable settlement on Bitcoin to programmable settlement on Ethereum, explains why counterparty discovery pushes apps toward centralized servers, AMMs or rollup sequencers, and introduces intents as binding commitments to state preferences shared over a gossip network. It outlines Anoma's design and use cases such as private auctions, multi-party bartering and decentralized rollups.

Speakers

Topics

From ETH Seoul 2022, hosted by Kryptoplanet.

Transcript

cool hello ah great we're ready to go um all right great to be here thank you for inviting me erica um i'm adrian i'm one of the co-founders of anoma and today i want to give you sort of a brief glimpse of anoma and what we are doing with the noma which is a unified architecture for full stack decentralized applications um i'll start with a sort of brief historic recap here of where we started where we are today and i think we're going to go in the future um the very first thing that we got was and by the way so like a lot of other

people historically have used different delineations for how these like how you think of generations evolutions of blockchains and i think what i'm presenting today is very different from this but i think it's somewhat more sensible so the really the first generation of blockchains was scriptable settlement and this is what we got with bitcoin in 2008. um bitcoin was massively innovative at the time and it was great at building things like cryptocurrencies [Music] interesting enough people started to build applications like colored coins named coin and a long tail of bitcoin forks on top of bitcoin um the important thing to remember remember though is that they were incredibly clunky like colored coins

weren't easy to use on bitcoin namecoin wasn't easy to use uh namecoin even required a fork of the original bitcoin client in order to make it work right but this is what scriptable settlement gave us and to me this is really the first generation of blockchains then we got ethereum and ethereum sort of ushered in the second generation of programmable settlement and vitalik actually talks about this in the original ethereum white paper that like one of the motivations for ethereum was that colored coins on bitcoin was incredibly clunky and we needed something that was more expressive more programmable than simple bitcoin script so we moved from colored coins to your c20s we moved from namecoin to ens but the really important thing to remember is that when ethereum was designed in 2014

we thought of a couple of applications that you can sort of bring over and make more efficient going from bitcoin to ethereum but there was a host of other applications that we sort of discovered later on are actually incredibly powerful and can be built only on programmable settlement these include things like dao's like nfts solo silver and tokens what we just spoke about right um so there was this host of new kinds of applications that were enabled by programmable settlement and you see this nowadays right that there's a ton of more applications just outside of esc 20s there is not now we have modern applications like taxes amems nft marketplaces but i would argue that they currently have similar downsides

on ethereum or on essentially programmable settlement layers um than we had on bitcoin with colored coins in the past right they're generally still clunky to use they generally still require at least one centralized web 2 component which for example in the case of openc is users alex mentioned intense right like users don't send transactions on ethereum when they interact with openc no they sign a message and they send it to a centralized web 2 server run by the openc team that then does some compute and then ends up settling some output of that compute on ethereum this is the same for xerox this is the same for kaoshop this is the same for optimism and stock number two it's always the same pattern people don't directly interact with these systems

because they require interactivity how do you get interactivity in the current model well you send stuff to a web 2 server that does some compute and then settles after you have done the interactive step something on a programmable settlement there um and i mean historically people keep talking about like generation three generation four and like any upgrade and a consensus mechanism is a new generation of blockchain and i would actually argue that in terms of what they fundamentally bring to developers and what kind of applications we can build on these systems they're really really similar to ethereum uh like i call them second generation plus plus so we've made some advances in for example whoever says civil resistance we moved from proof of work to proof of stake and that's now working really well

we also made tremendous advances in consensus mechanisms like we have tendermint now we have avalanche we hopefully eventually get e2 single slot finality right but it's still fundamentally the same model it's programmable settlement it's um the chain does nothing but settle some state transition yeah so in the end it's still programmable settlement the important thing to remember though is that settlement is not sufficient settlement is sufficient if the parties already know who they are what they want and with whom to coordinate uh this is generally not true for most interesting things like if you think you want to sell an asset like you want to sell some eth for bitcoin you need interactivity just to discover a counterparty that has the inverse if you want to sell an nft

you need a counterparty um so pretty much everything that's interesting requires some amount of counterparty discovery uh like the only thing that doesn't actually require interactivity or counterparty discovery is if i want to send money to myself um like if i want to send money to myself i have all the state that i need i know my addresses and for example i can use as a result like some like something like tornado cash on ethereum that actually doesn't require counterparty discovery but it's like it's a minuscule part of what i would consider interesting applications at the moment um yeah so many applications actually need this kind of counterparty discovery service because it is way is really difficult to have a decentralized way of like oh i want to

trade bitcoin for ease oh someone bob in san francisco has the inverse of this transaction and is willing to coordinate with me um you so you see this everywhere you see this in marketplaces like openc is a great example here you see the quadratic public goods funding with git coin you have project donors and funders that all need to discover each other you see this also in daos also you see this in roll ups like roll ups are alternate counterparty discovery because this is exactly what a rollup server does like this is what the optimism server does it aggregates a bunch of people's intents does some compute so it like does the counterparty discovery and solving for this system and then settles it on some underlying base layer at the moment ethereum um

so how do we currently deal with kind of party discovery um well we have amms and i would say amms are sort of the best answer we have to counterparty discovery if we live in a programmable settlement world right like if you only have if the thing that you have available is programmable settlement an amm is probably the best thing you can do to enable decentralized counterparty discovery because you just treat the ethereum consensus state as this is the main counterparty discovery point and everyone talks to this and everyone sees the state updates the problem is this is very expensive because everything has to be now globally ordered and it's incredibly silly because you don't need a total global order to

be established to say oh i want to trade some e for bitcoin this is mostly that like it's a side effect of just being stuck in this programmable settlement world on chain order books kind of do exactly the same thing way like the easy answer is always you just dump everything on chain and establish total global order of it the transactions are the intents and then have the system figured out but it's really expensive so the other very common approach nowadays is single operator databases that are just a centralization points uh so openc does this with a centralized openc server run by the company xerox relayers do this flashbots interestingly is it it's exactly the same pattern in flashboards people sign a message they send it to a centralized slashbot server

um the real they call this the mev relayer um that does some compute and then settles on a chain right um yeah roll up sequencers do this so these are always trusted parties um in the best case they can't steal your money in the worst case they are effectively a centralized exchange that can run away with all your funds um this is why we've designed systems like fraud proofs and so on in order to like reduce the trust assumptions on these central parties but in all cases these trusted single-operated databases can censor you as in they can prevent you from interacting with the system because they have a single ip address that can just block your submissions um and now there are some other approaches like app specific sovereign

chains dydx is approaching is trying this out right now there are a lot of other downsides because now all of a sudden you have to launch your own blockchain it's a lot of def work you lose full composability across the ecosystem because all of a sudden to be fair you already don't have this on current programmable settlement architectures where like specific intents are siloed in their little application i can't build a new application that reasons over let's say the openc and the 0x intense at the same time so today i am going to present a normal which is it's an architecture this is sort of an important thing to understand it's an architecture with many different deployment models you can deploy and i'll speak more in depth about this in a

bit but you can deploy a normal as an l1 you can many people can deploy a normal as many l ones like if a city wants to take a noma and the player is the one that works too you can deploy this as an l1 and a half as an l2 yeah so noma is a unified architecture for full stack decentralized applications what does this mean more in depth well the really long but all-encompassing tackling is that it is an intense privacy preserving protocol for decentralized counterparty discovery solving an atomic multi-chain settlement um i'll go through the first part of the sentence not so much atomic multi-chain settlement the other talks i don't have like two hours to explain atomic multi-chain settlement today so what are the key design principles well one it's intense centricity and two

it's homogeneous architectures and heterogeneous security models and we've already spoken a little bit about what does it mean for something to be intent centric it's the idea that users express what they want and not how to get this um this is also honestly like the the mental model that i think everyone has when they interact with a blockchain but what you currently do effectively in whether this is the evm or the near vm or the solana vm is always you don't actually express what you want you are you authorize an execution trace like when you send a transaction on these systems you authorize not a specific future result you authorize there are these op codes and these opcodes can do arbitrary compute as a result this means

as a user you have to audit honestly every single opcode that you sign over because otherwise you can have proxy contracts that steal your money because they can do arbitrary things because as a user you never defined what you wanted you just defined on how to get it this is also something that i think my parents will never be able to understand in terms of the security model that they have when interacting with blockchains like when someone taps that card in the store they don't think i'm authorizing all api calls between all visa servers and they may do arbitrary things and afterwards i should check whether they cheated me like the mental model is you tap your card and you're like you're authorizing a specific state transition like you're

authorizing that some money is debited from your account um so intents are binding programmatic commitments to state preferences um once you think more about intent centricity and how you design underlying architectures a really nice other feature is that it falls out that you can have in a p2p intent gossip network that doesn't have to be globally consistent as in everyone in this room can have a different view of the current available intents in the world um so as a result you can have like 100 billion intents floating around because they're not consensus critical we don't need a globally consistent view of them and different people can opt in to receive different intents right because maybe i only care about the open sea intense because i'm into nfts and i want to see all the nft traits so i can only

subscribe to the open is that a fire alarm okay good um right so now you have an intent gossip network right you have 100 billion intense floating around they're not settled actually like they're just like what you what individual people want um how do you actually end up containing combining these intents and creating transactions out of this this is where solvers come in they exist pretty much right now like an open c server is already a solver for openc the optimism sequencer is already a solver just for optimism specifically a stark net prover is a solver just for the start and specific transaction intents but with our noma you can have a generalized intent and then you can have

solvers that go ah these 15 things are combinable maybe there are some fungible token trading right because you can do things like i want to um i user a wants to do e for bitcoin user b wants to do bitcoin for near and user c wants to do near for east completing the cycle so you can settle an arbitrary amount an arbitrary number of intents in the same transaction so solvers they will most likely specialize in some specific intents they're building generalized solvers is very hard this is probably an np-hard problem so if someone can solve this you will make a ton of money because you can sort of solve an arbitrary state transition um practically speaking different solvers

will can specialize for different kinds of intent so for example you can specialize for fungible token training you can specialize for nft trading you can specialize for like lunch date setups because the important thing to remember about intense is that they're fully programmatic as an intent is just code they do trading with other people um it is not specific to actually like what you think of a financial transaction or trade you can say that you can use the intent system to express that you want to meet someone that is into bot games at a cafe in seoul on like sunday at 5 pm this is it's just whatever you can write it wasn't you can express it as an intent uh there are no restrictions here yes and this leads to a nice feature that intense are fully composable um

you can reason as a solver over the openc intense the optimism intense and like normal trading intent at the same time and figure out which ones are combinable there um yeah then solvers create transactions and transactions are then set on settlement layer and here it actually doesn't matter which settlement layer this is why i mean that you can deploy an architecture like a nomad to ethereum as an l2 where ethereum just ends up being the settlement layer this kind of intent centric design is what everyone is discovering at the moment but for application specific purposes right like optimism flashbacks they're all discovering that they like they should be thinking about intense but people still think about transactions but if you actually want to have decentralized counterparty to discover you need to be thinking about intense

the other cool thing is this that this leads to a very declarative paradigm for application development where i said in the beginning currently in transaction centric designs you authorize execution traces of how your smart contact is allowed to do compute in intensity design you don't actually do this you just say what future state transitions you find with as a result you don't have to worry about the intermediate steps um that get invoked and whether like a proxy contract is broken or not because you never authorize a proxy contract i guess as long as that proxy contract returns you the state changes that you are okay with in your intent this is fine um and this is actually also how sort of the anoma settlement layer works is that instead of doing arbitrary compute in the contracts transactions

define what the outcoming like what the resulting state transitions are going to be and then all the intents just verify that they're okay with the resulting state changes um for an end user this has the really nice benefit that it's a black box like user's author intents then submit them then magic happens because they don't care on how these intents get satisfied and afterwards they just need to verify whether their intent was settled or not so i am not going to walk through this entire diagram but this is sort of a high level overview of the architecture of anoma where on the far left you have counterparty discovery where users actually write intents and intents can be either transparent

shielded or private if they're shielded they involve also the generation of a bunch of their knowledge proofs if they're private they also involve zero knowledge proofs and fully homomorphic encryption honestly fhe is like at least five years out that's still very exploratory research then users sign these intents they submit them to their client submits them now it hits the intent gossip network and the nice thing is the intent gossip network can span over many different blockchains at the same time over many different deployment models of our nom at the same time so you have one globally connected intent gossip network that can handle the intents for like the enormous l1 deployment the anomala south korea deployment or the anomala l2 deployment

on ethereum and because intents can just specify in which security model they want to be settled solvers look at a number of intents maybe they take 15 combine them into a transaction they submit them to the transaction mempool but first they encrypt all transactions so in onoma transactions are encrypted against a public key run by the val dataset this uses a protocol called favio which is a distributed key generation protocol high level this solves mev all transactions are encrypted values only order and propose encrypted transactions so in block n you fix a list of you fix the ordering of a list of encrypted byte strings and in block n plus one the

validator set jointly starts decrypts all the encrypted transactions and then executes them but at that point they can't sandwich front run or background you anymore because the ordering has already already been established um yeah now you have a finalized block and then you go into the execution verification environment uh which is a unified execution environment that you can can be deployed to many different um sort of settlement layers um this also allows you to one of the very nice things about the unified execution environment is that it handles transparent chill and private state at the same time as in you can write applications that are partially transparent and partially private because this will honestly

depend on the specific applications on how much privacy or at what level do they need privacy and then in the end users just can verify uh the settlement of an intent how many ah time is fine right homogeneous architecture heterogeneous security so one of the important things to sort of realize is that protocols can easily be benevolent monopolies like we all benefit from agreeing on tcp as a standard no one actually makes any money on this but it's just nice that we can use the same protocols to talk to all the servers in the world this is also why our phones are pretty cool because we sort of globally agreed on a cellular backbone standard and my phone that i bought in europe works in asia as well as in north america as well as in south

america as well as in africa right like my phone can roam can use the same protocols to roam in different security models um and the big thing to realize is like that the losses of protocol standardization are like very minimal um like sure we could build a slightly better version of tcp but we would lose much more by the fragmentation of having a ton of different protocols then we would buy sort of the tiny losses that we take because maybe tcpip isn't exactly optimal the very important thing though is that security domains should not be monopolies um because security domains uh for example a country is a security domain right like a validator i said is a security domain like ethereum is one

specific security domain um and it can charge rent it can steal funds it can um it can collapse right like different security domains have different security properties and they can fail independently of each other and as users we want to be very capable of not like it's this is not about telling people what kind of security they should be using it's more that people should have a choice as in maybe to my parents it's preferable that all their digital assets are secured by the 200 people in their village because this is sort of their local trust zone this is the people they trust but maybe someone that lives in argentina really wants to have their assets in the global ethereum security model because they

don't trust their local government but they trust the global ethereum model so yeah we should be separating protocols and architectures from the underlying security models currently we tend to very much tie them together so this leads to the nice fact that you can apply a noma as an architecture in many different ways you can deploy this as an l1 as a sovereign chain this is what we are currently doing as a first step you can apply them as community-operated chains where let's say the world of warcraft community wants to have a financial settlement backbone they can like take this architecture and run it themselves the city of seoul can do this to run the financial system in seoul you can also deploy this as an l1 and a half if you just want to decentralize a specific dap construction so for example you

could have a specific deployment for let's say openc or you can deploy this as a generalized l2 where you build adapts where you use the distributed decentralized counterparty discovery and solving component of a noma while keeping all the settlement to ethereum yep so the first case you just use the intent gauss sub network only and sequence and settle elsewhere the second model is you decentralize the solvers i i decentralized the roll-up sequencers or the approvers or the openc servers um but the settlement still happens on your preferred security model which i think for most people in this room including me at the moment is probably ethereum or you yeah you can also use this to decentralize specific applications or

you can deploy a normal as a fractional instance with local settlement guarantees uh so how do dapps on a normal actually look like well they have intent formats this is something people need to agree on they have solve algorithms which don't have to be optimal they just have like most likely applications ananoma should just like provide a standard solver implementation so that at least there's some like baseline solvers available but there's a huge incentive for people to build their own solvers that are because you're competing effectively you're trying to the the people that can most efficiently solve can settle most uh intents and they can get gather the fees from them um and then you then you also have validity predicates which are settlement and variants for users or applications for example if you're transacting with

bitcoin on anoma the settlement invariant for bitcoin is that onoma cannot create or destroy bitcoin so like applications as well as users can have settlement variants that they that need to be enforced this kind of vertically integrated architecture means that you get end-to-end security liveness and privacy guarantees um and importantly that like our phones applications are portable across security domains as in like your application your wallet can start roaming between different blockchains as long as we all agree on similar kind of protocols so what can you build with a normal well you can build and this sort of goes back to the earliest thing which i said when we went from bitcoin to ethereum and now to sort

of the sonoma architecture that we didn't think of all the applications that you could be could be built using this kind of architecture when we build ethereum and i think there's like a number of existing daps that i can see using this kind of stuff but i think there's also going to be a large number of applications that haven't been explored yet because we're just starting to sort of think about what this uh generalized architecture means uh so existing dapps you can build with full stack decentralization are like things like fungible token swaps like xerox cowshop non-fungible marketplaces wyvern seaport openc you can build a very capital efficient amms because you don't need capital locking and um you can decentralize the roll-ups using enormous

you can do public goods funding so um bitcoin without the semi-trusted multi-sig where everyone's commitments to fund a certain project are just intense and once you reach a threshold a solver can figure out what is the best combination of these intents which project should uh receive the right amount of funding but there's also a ton of novel adapts that i can already think about that require more than simple programmable settlement things like private dials private auctions so anoma also comes due to the fact that we have a threshold encryption system that prevents front running we also get effectively a programmable threshold decryption where applications can say here's a batch

all all transactions for the specific application are encrypted let's say for the duration of this batch let's say 10 blocks and this is what you use in order to build um like second price auctions that aren't front runnable because everyone in the auction submits their bits they are encrypted for the batch duration or for the auction duration they can be defined by the application afterwards the validator set starts decrypts all bits at the same time and then the application just needs to verify what is actually the winning bit but no one can inject new bits or remove old bits from it um yes you can build private games i think the thing that i'm most excited about is multivariate multi-party multivariate

private battering it's the idea that you can tr that like i can say that i want to trade some bitcoin against some cryptokitties someone else wants to trade cryptokitties against train tickets in seoul and the third person wants to trade like train tickets if the weather is nice against um bitcoin um as long as the weather is nice all these three things are combinable and settlable and this like scales to end party bartering as in you can have a thousand individual intents that are all settlable together um which means as a user i don't have to worry about like figuring out the right route for my asset i just say what i have and what i want and as long as there's some sort of path um intense can represent this and you can build on-demand runtime

roll-ups because what is a roll-up essentially a roll-up is a computational compression once you have an intent that goes from a to b and another antenna that goes from b to c and the third intent that goes from c to d you can just collapse them to one and ten from a to d and this is so high level what roll-ups do yeah so anoma is built by helix these are my two co-founders so it's uh ours here as well as in the room um the team is much larger than this so we couldn't build this both with the three of us so check out the team um yeah and this is a normal for you it's a unified architecture full full-stack decentralization