Skip to content

Instantly share code, notes, and snippets.

@awasunyin
Last active July 14, 2022 14:52
Show Gist options
  • Save awasunyin/8e0074672bd4ebd436d5c78c4c6721a1 to your computer and use it in GitHub Desktop.
Save awasunyin/8e0074672bd4ebd436d5c78c4c6721a1 to your computer and use it in GitHub Desktop.
The file name speaks for itself.

What is Anoma?

  • Bitcoin (Gen 1, 2008) enabled scriptable settlement, great for cryptocurrencies, and enough for some dApps, colored coins and Namecoin – they were clunky, but worked!
  • Ethereum (Gen 2, 2015) enabled programmable settlement, more expressivity via Turing-complete smart contracts, led to much better versions of colored coins (ERC20) and Namecoin (ENS), plus many more (DAOs, NFTs, SBTs, etc).
    • But, programmable settlement is not sufficient for all advanced applications on Ethereum (0x, CoW Swap, Uniswap, Wyvern / Seaport / OpenSea, Flashbots, Gitcoin, L2s like Optimism and Starknet, etc.)
    • Because they require 1) more expressive intents, 2) counterparty discovery, and 3) a searcher/sequencer/solver component
    • Most dApps require 1), 2), & 3), but they are implementing the first two with a centralized Web2 server run by the core team – basically all dApps are at best Web2.5, where in some cases the final settlement happens on Ethereum.
  • All protocols from Ethereum to today (2022):
    • Major advances in sybil resistance, consensus, scalability
    • But essentially they offer the exact same dApp building paradigm as Ethereum: programmable settlement (Gen 2).
  • Anoma (Gen 3):

Anoma is an intent-centric, privacy-preserving protocol for decentralized counterparty discovery, solving, and multi-chain atomic settlement.

  • Simply put: with one unified architecture, Anoma provides all components that modern applications (0x, CoWSwap, OpenSea, etc.) need without requiring any component to be a Web2 component – thus enabling truly decentralized dApps.
    • An NFT marketplace like OpenSea could use the intent-gossip network for decentralized counterparty discovery, while the OpenSea team operates an application specific solver and a website for visualizing intents.
    • An MEV-protected protocol like CoWSwap already uses the concept of intents, which are collected and solved by a single permissioned solver. With Anoma, the intent-gossip network and counterparty discovery could be decentralized, and solvers could be fully permissionless.
    • Starknet (zk-rollup, L2) could focus on their core compentency of building the best zk-provers. Instead of a single server (the prover) operated by Starkware receiving all transactions to be included in the next proof, Starknet could use the intent gossip network for decentralized intent gathering, which would make the entire system permissionless since community members could deploy their own provers in an attempt to compete with the official one.
    • With sophisticated apps like Quadratic Voting / Quadratic Funding, Gitcoin could only operate a solver that performs the tallying of every voting round, while their website would be visualizing data on user intents (voters and projects).
  • Going further:
    • Anoma's intent-centric architecture + validity predicates introduce a new programming model for dApps - closer to Declarative Programming (compared to programmable settlement, where it's closer to Imperative Programming)
    • As intents can be arbitrary code, you can build applications that you cannot build with programmable settlement only:
      • N-party barters of arbitrary complexity
      • AMMs that do not require capital being locked
      • User-defined privacy levels - interactions can be transparent, shielded, or private
      • Full MEV mitigation as permitted by the market structure

Intents

An intent is what the user wants to do when the user decides to interact with a protocol.

A simple intent is: "Transfer X from A to B". Programmable settlement can cover simple intents. However, real-world user intents are more complex, e.g. "Sell an NFT" or "Sell an NFT & incorporate the cost of carbon" or "Trade X for Y" - atm applications that facilitate more complex intents cannot do so with full decentralization.

Decentralized solving

"Decentralized solving" is a generalization of the compute required specific to the user intents and application in this architecture.

In Ethereum, modern applications have the following component:

  • Optimism: users send their transactions to the sequencer, which is a server operated by the Optimism team (not decentralized)
  • Starknet: in order to provide zk rollups, users of starknet need to send their transactions to Starkware's prover server (not decentralized)
  • CoWSwap: user swaps are sent to a solver server operated by the CoWSwap team (solving is permissioned)

With Anoma's architecture, the sequencer from Optimism, prover from Starknet, and solver from CoWSwap could be fully decentralized and anyone could act as a solver (permisionless) for any number and combination of intents that exist in the intent gossip network.

Decentralized applications beyond crypto

Many applications that we use on a day-to-day basis require a similar architecture (counterparty discovery, solving, settlement, means of payment). Let's analyse Airbnb (in its current form) as an example:

  1. Airbnb's website acts as a centralized counterparty discovery: the features of the site make it easy for hosts and guests to find each other.
  2. Airbnb also acts as a centralized gatekeeper: they set the rules and give permissions to create guest/host accounts.
  3. Airbnb provies an escrow service between guest/host, so that guests/host do not need to trust each other, they just need to trust Airbnb with the money.
  4. Airbnb is integrated with payment providers e.g. credit cards, as form of payment.

If we were to build Airbnb on Ethereum (and any other platform that provides programmable settlement Solana, NEAR, etc), programmable settlement is more than enough to grant 3) & 4). However, in order to enable 1) & 2), they'd have to follow a similar architecture to OpenSea's – with 1 & 2 being centralized.

On Anoma, it'd look something like:

  • Intents:
    • Guests: they create intents describing what kind of lodging they're looking for, dates, characteristics, price ranges, etc. – as an intent.
    • Hosts: create also intents describing the kind of housing they offer, available dates, price ranges, etc.
    • This is a great example of why intents should be as expressive as possible (guests/hosts might have a myriad of requirements and preferences).
  • Validity predicates:
    • Guest VP: (oversimplified) the wallet of the guest
    • Host VP: (oversimplified) the wallet of the host
  • Solver:
    • Becoming a solver is permissionless, but there might be benefits to specialization like in this case solving for a short-term rental marketplace requires the knowledge to compute over the app-specific preferences of both guests and hosts.
    • dAirbnb would operate a solver: specializes in matching "à la traditional Airbnb", they observe the intent gossip network, filter for the intents that are relevant to dAirbnb, gather the intents that in combination satisfy each other, and submit it as a transaction to Anoma.

dAirbnb would be completely decentralized, and there are a few add-ons they can decide to deploy:

  • "Verified checkmark": A value-add process in real-world-services like matching guests with hosts would be the fact that dAirbnb provides this service of verifying people and lodging (similar to how OpenSea verifies artists). If dAirbnb wanted to provide this service, all it would take would be:
    • dAirbnb Application Specific VP: in this VP they show what guests/hosts they have issued a "verified checkmark" to,
    • guests and/or hosts intents would have to add the requirement that the matching guest/host has an dAirbnb "verified checkmark"
      • Note that this wouldn't be decentralized, however, it might create easier conditions for competitors of "verified checkmarks" to arise.
  • Flexibility in settlement & means of payment: under this model, dAirbnb could also request intents to pay their solving fee in a specific token or basket of tokens (e.g. their dAirbnb token, or a combination of cryptocurrencies).

Interesting enough, you can basically swap out "Airbnb" above for any other real-world services, the architecture would remain the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment