An architecture for User-Defined markets
ETHCC 5 · July 2022 · 27:30
Awa Sun Yin explains Anoma's architecture for user-defined markets. The presentation examines intents, programmable validity predicates and the separation of execution from verification as ways to give users more control over account and protocol behavior.
Speakers
Topics
From ETHCC 5, hosted by Ethereum France.
Transcript
hello everyone my name is awa i am one of the co-founders of anoma and today i'm here to talk about how enormous architecture can enable user-defined markets and applications so i always like to start with setting up the right framework and i would like to tell a little bit this evolution of the history behind the evolution of different protocols so far so i like to think of bitcoin as like the first generation which introduced the idea of scriptable settlement scriptable settlement for example via bitcoin script allowed you to it was really good for building a class of applications particularly for example cryptocurrencies with
different properties as well as the other kinds of monetary policies and what a lot of people don't know actually is that with bitcoin script you can actually build many other cool applications like color coins name coin and a bunch of others but and they they actually work right vitalik speaks about it in the ethereum white paper where he says that he actually mentions these two examples and then he says that they effectively they work but they become a little bit clunky they come at trade-offs around usability and they are restricted properties so
released in 2015 the deployment of ethereum marked the beginning of a second generation a new paradigm of architectures for decentralized applications i like to refer to it as programmable settlement programmable settlement just enable more expensivity at the virtual machine layer which allows you to build all the applications that could build on bitcoin with a scriptable settlement like color coins as like currently known the established uh the well-established erc20s or ens the world established used to be namecoin and a bunch of other cool stuff like decentralized autonomous organizations and new kinds of assets like nfc solarbound tokens and a bunch of other stuff
what you can also build on ethereum is a bunch of other contemporary more complex applications some examples there are uniswap xerox bitcoin calculator cool stuff wyvern openc starknet optimism and yes they work but the issue with modern applications that are built um only reliance on programmable settlement is that they actually require they have more requirements that settlement cannot satisfy and they have particularly two things one thing is that it is these protocols are actually application specific and this other thing is that in if you
zoom out in the architecture and just forget about what happens in ethereum usually that is restricted to settlement you will look that you will see that in the protocol design they will have at least one component that is centralized or is a web 2 component so in the same way you can build color coins bitcoin and ethereum you can um in bitcoin you can build on ethereum all these modern applications so what has happened until now it's been almost seven years ever since ethereum was deployed and there has been many advances in civil resistance mechanisms we are finally moving away from work before stake consensus longest chain consensus and different variants tenement
avalanche many others and scaling architectures we have sharding roll-ups and many others but if you look at what it is that the paradigm that introduced you will realize that actually every other protocol that has been deployed since ethereum has been offering programmable settlement basically the same issues that they offer it in different flavors and colors so the conclusion is that programmable settlement is sufficient only if you have already you already know which parties are involved and what it is that they're settling on so for that programmer settlement is great
but if you look at some of the contemporary cooler applications you will see that it is not sufficient because one key part of it is that they need counterparty discovery and this is the case for the vast majority of modern applications so there's an immersion approach as you have seen where you can if we if let's say layer two wants to decentralize they can always do the following which is they use the cosmos sdk or substrate it makes it easier and what you do is you build an application specific sovereign chain right it's like layer one that does that specific thing in a centralized way and
you can actually do this and it will solve immediately the immediate centralization problem but the issue is that it comes with actually a lot of trade-offs for example the loss of network effects be it app composibility or the software reuse and in reality it adds this proportional complexity to the user because users all suddenly need to and the developers too they also need to reason through this multi-layered security privacy and the latency domains including the token so another approach would be what we proposed which is introduction of a new generation of applications that is full stack
and this is represented today anoma as a unified architecture that allows you to build full stack decentralized applications so the architecture phenomena in a few sentences is characterized for being intent centric first of all what is an intent an intent is simply put what the user wants to do wants to achieve when they decide to interact with a protocol and 10 can be as simple as i want to transfer let's say asset x from a to b or i want to swap x for y in terms in in the normal protocol are understood as encoding of the user's desires they transition and they can be anything it can even be programmatic
another characteristic is that it is inbuilt natively private privacy preserving and it does it in a very unique way where there is one unified execution environment able to handle both transparent shielded and private states so an application built on this unified architecture can leverage in in the job sense they can leverage all three different um privacy guarantees in one application the counterparty discovery and solving part is what is really essential so as i mentioned before most of the modern dapps required is this uh this functionality and the normal just offers it from the get-go in a fully
decentralized way and um the last part about architecture is that we're striving for basically enabling atomic multi-change settlement this is the idea that at the moment all interoperability protocols require you that the asset is moved to one secure domain before you can use it so when you do that you're actually losing atomicity right there's always the guarantee that something else happens when that process happens so really what we're trying to achieve with novel consensus which which is named heterogeneous paxos is that if a user intent includes an asset um for example the swap of an asset that leaves an ethereum and another one that lives on a
cosmos chain or whatever other chain that swap can happen atomically without requiring the user to move them first over a bridge to one security domain so intention certainty i will today would like to really focus on the intense centricity of the unknown architecture intension anomal are programmatic they can contain any kind of logic they can even contain code and this part this design philosophy is actually essential to enable the centralized contemporary discovery which is so essential for interesting applications and here it has a second order effect which is it forces or it constitutes a
declarative paradigm for building and using potentialized applications so this diagram tries to explain what a declarative paradigm for adapts means and this is the state of how we think that applications should be built where the user has only has to worry about describing creating the intent describing really what the state transition is that they want and sign it the intent goes through the normal protocol and the only other thing that the user needs to worry about is whether the intent was settled or not and this has to be publicly verifiable right so in the middle there is the
unified architecture of anoma and there's actually a lot of complexity in there so there's like it's in complete novel peer-to-peer networking stack there's like centralized solvers there's tons of zkp stuff there's fairview consensus proof of there's a lot of things that generally speaking the users should not worry about the only thing that the user should worry about is the fact that the intent describes what they want and the protocol and they don't need to understand at all what happens under the hood and the protocol is just designed to settle this intent or simply just let it fail so that is the end goal for applications to be built on and this is why
it is different um to transaction centric architectures where uh they end up being just more imperative as like users and developers need to reason more around how it actually works in order to use it safely and with high assurance or high pricing guarantees whereas in this case it is declarative as in as long as the user defines what they want then the protocol will do that or not do anything so let's walk you through this high level overview of how a normal is architected because this is a radically different architecture it's what it is that you're used to especially with scriptable segment and programmable settlement so the first part is kind of party
here they are i highlight the four main let's say asians we have the user that crafts intense by our clients and there is a intense gossip layer that is formed by the intent gossip notes intent gossiping is fully permissioned permissionless and there might never be like a global view of the pool of intents that might be just bars and another critical part of the counterparty discovery layer is solvers so solvers you can imagine them to be um maybe from the get go application specific as like some solvers might just specialize in trying to match intents that are
focusing on fungible asset trading or others that are more focused on nft trading um but solvers are have the incentive to be just monitoring the pool of intents and seeing what it is which kinds of transactions they can gather together in a way that in combination they satisfy each other because intense in a normal they are not finalized transactions they are partial transactions so here i'm looking just showing you the flow of how it looks if we have um if we have transparent intents like there's no privacy just public just anonymous as the current the most laying ones so the user creates an incense and then the
and then the solvers the intent is gossip around the gossip network and then the solvers look find that intent and see that it can be combined with the four others and then in combination that forms a valid state transition there are a few novel primitives that e that are really need to get like mvv protection from validators from the get-go like in this case um the default is that before the transactions go into the mempo they're all encrypted against vario then the rest follows the same but at this point um nobody that is trying to extract mav by monitoring the mempool can actually do anything because all they would see are encrypted transactions that were submitted by the solver
same goes through um later on the next phases are very standard for proof of stake networks that follow some kind of vfc consensus so here's another unique part where after the block has been finalized all the transactions get decrypted at the same time this is why it cannot be front run by validators and here this is where validity predicates play a role in valid predicates are a unique concept to how enormous architects are around accounts and applications and the difference the key difference is that when validators execute the state transitions before they can actually
finalize on the ledger the first needs to check all the involved validity predicates that the state transition includes and only if all the checks are passed then this then this transaction is actually written into ledger and actually finalized and then in the end the user just needs to verify publicly just read the data chain and see if this intent was actually settled so you can also do applications within temps that are shielded the distinction between shielded and private i will tell you in a little bit but we call this shielded in this case and the difference between this intent and the transparent intent is that the who of this intent is kept private so there it carries the zoo knowledge
proof about this but the what has to be kept transparent especially if you want to enable decentralized counterparty discovery and solving this is necessary because those solvers need to be able to compute over this data in order to find matching intents yep on the rest is there a few nuances around like right there there's a recursive proof and then at the ends actually at all times the who is kept private and in the unified execution environment in this case in order to verify the proof whether and do the validation of the state it will just copy calling social knowledge circuits and actually this is if you want to leverage zoology proofs if you want to
leverage other cryptography it's different the phone leverages generation proofs this is as private as you can get with an architecture as long as you want like interactivity like decentralized kind of priority discovery you can't do better than this with the knowledge proofs so private intents and here's the difference the difference between shielded intents and private intents is that private intents are fully encrypted so even the who and what everything around the intent is a ciphertext and the way this works with this architecture as well is that it leverage really cutting-edge cryptography
it's called fully homomorphic encryption the intuition around how it works is that you create an incense you also create an intent another person creating intent and then the fourth person is the one that takes them and that's computes but at all times the intents are kept fully encrypted and you might have heard about homomorphic encryption it is a cryptography that is deployed traditionally in the field of ai machine learning um but in this case you you could leverage it to like keep applications fully private anyways so that was an overview of the major components um actually we are building one instantiation as layer one phenomena two four applications that
want to benefit for the actual vertical integration full stack but there are multiple deployment models um for noma you can deploy it yourself we call it fractal scaling as a sovereign chain and a community operator change so you have all the architecture there but you get to customize all everything around the token the governance and your security model as like do you want it to be prostate before work with authority you decide you can also deploy it as a layer 1.5 so for example the centralized lc constructions so you could actually it's a if optimism or rb term or stockinette wanted to decentralize the current sequencer the way they could do this is the counterparty discovery and solving
part is just just replicated on using the known architecture and they can still basically function as connect to bridge and then do the final settlement on it or do the final like um market route at root update on uh on ethereum so as a layer two you can also just let's say with this entire full stack except for settlement you can build up dabs um while keeping the settlements ethereum there are many applications in the thermical system that wants to preserve this property for many reasons but i would like to stress that actually anoma is from the get-go interoperable and it is just not focused on token creation i would say that over the last
seven years what is proven is that programmable settlement is actually really good at token creation so we're not focusing on that so okay enough abstractions what it is that you can build on an over right so here are some examples of existing dapps that you can build but without having to have a one component that is centralized and one class is that is like really well established a lot of applications around this is different forms or decentralized exchanges for for example fungible tokens 0x cal swap for non-fungible tokens wire and support openc amms like union swap you can also build
well i would say just for for you to imagine it in a more practical way if openc were it's built on this unified architecture the only thing that the front and you know how openc relies a lot on kinder party discovery and they use their website which is a permissions run by the company website so that is what you use when matches allows people to that want to sell or buy nfc is discover each other that's kind of part of discovery but that is permission at the moment um and then they do a final settlement um in the unknown ethereum but that part solving the matching part is done fully by the website so if openc were to rebuild the entire stack using nanoma the only thing that the website would do
really is to visualize the intent gossip layer so visualize what intents are relevant for nft trading and simply basically is going to be an explorer of in the end just simply visualize what it has been settled for what's relevant for the users of openc another class of really emerging and very trendy applications is roll ups right scaling solutions and you have optimism um optimistic roll-ups for example optimism arbitrary and ziggy like start at executive sync and if you look in the architecture you will see that all of them have this thing in common which is they have one sequencer that is centralized and a bunch of really cool applications
the theme ecosystem like i've never seen them anywhere else like quadratic funding in the case of bitcoin so what can you build on a noma that you cannot build with programmable settlements so they have the new classes of novel adapts so you can do because of a unified execution environment that allows you to handle that our steps handle both transparent private and shielded state you can build things like private dials where for example parts of it are kept fully private but there are some parts that are fully transparent which is something that you really would like to have in adele like votes get private but the results kept transparent let's say you can do also private auctions these
benefits from fairview as like a major novel primitive that allows you to configure for example when there's an auction running you want to keep this property where all bids are kept private until they are revealed at the same time when the deadline has passed so and then this can be combined with for people who want that um for example the concealment of the identity the who is being kept prepped a bunch of other things like private games everything that's multi-party um and then you require some states to be in the process privates it really benefits from an architectural like this one and one that i want to talk about which is multi-party multivariate private
partnering so this is like very loaded as an application but this is what actually leads to use of the flying markets so remember this is the goal right of like this is how applications should be built and this is where the users should care about developers should care about just the creation of intent and the use and the verification of the internet and intents can be anything so instead of having instead of having the constraints of like xerox defining which pairs can be traded or open c defining like which nfts which property is to list you as the user you can go nuts here and then go to find anything that it is that you want and this is how you can maybe the worst case is that it turns out that it's so sparse and then such an obscure
thing that never gets settled but that doesn't hurt um but the worst the the best thing they just can enable is that it turns out there were other other intense or counter intense they were actually looking for the same thing or the opposing matching thing so this is how you could give birth to like user defined markets and i would like to actually remind all of us once again about the purpose of this entire space so there is a suddenly there is a class of problems or design flaws in the space so some of them are mav some of them are surveillance capitalism and a bunch of other exploitative paradigms that we're
carrying over from web 2. and i think that whenever we think of a decentralized architecture whenever we think about that and we try to redesign and build it once you think of can you really enable a more equitable relationship between the user and the system and if the if there is room for a few parties to extract this proportion amount of value given how little value they give back to the process then that has to be eliminated and this is one of the reasons what really motivates me to pursue an intent centric architecture because as long as the intent has to be described as a user wants then the system will not add additional information externalities
this is these are my co-founders you might know adrian from early developer customers fundaments and also joined weber foundation you might know christopher goes who is an architect of many primitives that we all leverage today like the ibc protocol that labels interoperability you might not know that christopher goes build the wyvern index protocol which powers up in c if you go to either gas station dot info check what is the top smart set of smart contracts called there and that's me well yeah christopher actually has green hair this week so if you're looking for him to chat with him about architecture you will only find if you want you will find him if you find somebody with green hair
and that's it um sonoma is a unified architecture full stack decentralization and i would invite you to follow us on twitter we are we write we just rewritten the white paper the previous one didn't do didn't explain it very well and if you would like to read it as soon as it comes out you will be posted on twitter thank you [Applause] yeah do you have any question that intent you subscribe to or commit
to is that are you committing to this state transition or to are you doing assertions on the desired state that it should result in the intent yeah the intent is it on the state transition or the final resulting state it's only uh your final your individual desired resulting state i see all right still is the fighting bomb testing it's still an operation or have you got a new um so the defending story is that we had actually the network ready with this entire intense system and we took it down because we
realized that people didn't understand really what's going on and what's cool is that recently we figured out how to actually speak about enoma we have been building this system for a year and a half plus but i think we only recently came to the way of um explaining it this way which i think is more comprehensible hopefully and the funny story is that i realized that a lot of applications in ethereum were all conversions towards this architecture it's just that they were building something that is application specific whereas we so far are the only ones building unified architecture that just provides basically 90 percent of what adapt needs but yeah it's still down but hopefully
comes up later this year i'm more fully fledged the new name it wasn't very popular i call it after a fractal number um yeah thank you [Applause] you