Enabling counterparty discovery with Anoma’s intent gossip and matchmaking system
As a bartering platform aiming to facilitate trade between faraway parties without prior channels of communication, Anoma relies on users being able to discover potential trading partners if it is to function effectively. Left to manual means of discovery, however, Anoma users would have a hard time tracking down other users whose needs exactly match their own, especially when wishing to barter niche assets or execute complex transactions. Therefore, in addition to the transaction gossip system proper to most blockchains, Anoma also provides an intent gossip and matchmaking system that enables users to broadcast (‘gossip’) intents, logical units of data that specify information relating to the desired barter. If two or more users create compatible intents, then nodes known as matchmakers detect their compatibility and combine them into a transaction. Anoma's intent gossip and matchmaking system thus forms a necessary counterpart to its transaction gossip system, since, before transactions can be executed, users first must express their intent to enact a state change.
The central function of Anoma’s intent gossip and matchmaking system is to enable counterparty discovery. To better understand the purpose behind intent gossiping and matchmaking, it can be helpful to consider its alternatives. In the absence of the intent gossip and matchmaking system, Anoma users would have to turn to manual methods of counterparty discovery; they might, for example, create a website to which all users could upload their intents and then scroll through the intents of others until they find a match. However, this method has considerable drawbacks, not least that it is very difficult to scale, is not fault-tolerant and is run by a single operator, etc. This does not mean that Anoma’s intent gossip system precludes the option of still searching for and discovering other users’ intents by manual means, and the use of private communication channels like Signal for this purpose is fully supported by Anoma. However, the intent gossip system is there to provide users with a much more efficient default and enables the immediate execution of transactions within Anoma.
How it works
At the same time that intent gossip nodes are gossiping intents, the matchmaker node queries the gossip nodes, ‘listening out’ for matching intents. Once it has received word of matching intents from the gossip node, the matchmaker node combines matching intents together into a transaction, which is subsequently encrypted and then gossiped around the transaction gossip system to be included in a block, decrypted, and executed.
Central to the smooth-functioning of the intent gossip system is its incentive compatibility. In a similar way to how cryptocurrency miners receive rewards for validating transaction blocks, Anoma’s gossip and matchmaker nodes receive rewards for gossiping and matching intents respectively. Whereas some users will choose to set up their own gossiping nodes or act as their own matchmakers when searching for trade partners, most users will rely on other nodes to do the gossiping and matching for them. In recognition of their effort, Anoma rewards gossip and matchmaker nodes with a cut of the transaction fee. Incentivising matchmaking in this way further boosts the system’s efficiency by encouraging users to match intents as quickly as possible. Keep a look out for a future article detailing the particulars of this incentive system.
There are multiple use cases for the intent gossip system in Anoma, varying from the very basic, like trading cryptocurrencies, to more complex state transitions. Here are some example scenarios for which users may create intents:
- Exchanging assets, such as 1 BTC for 2 ETH, or a blue-eyed crypto-kitty for a kombucha subscription.
- Selling or buying services, physical assets, or NFTs.
- Finding people to share costs with, such as for a jointly owned holiday home.
- Fundraising for charities or causes, whether that’s collecting money for an open-source womens’ safety app or a new climbing frame at the local park.
- Making n-party atomic settlements, for example if fashion retailers were to agree to incorporate the cost of carbon in their garment pricing.
- Voting through changes to Anoma, such as system upgrades.
Here’s an example of a standard use case, in which two parties are both looking to exchange coins (note that they themselves state the exchange rate - we’ll come back to this later in the article):
Worth mentioning here is that it is important to differentiate between the abstract function of the intent gossip system, ie. to help counterparties find each other, and its physical instantiations. The intent gossip system doesn’t necessarily need to be used over the world wide web; rather, Anoma’s intent gossip system can be instantiated in multiple different physical environments, whether as virtual subspaces or via bluetooth. For example, at a gaming convention, users could set up a local instance of the intent gossip and matchmaking system over bluetooth using an app on their phones and transact across game worlds. This is important because it speaks to Anoma’s vision that financial privacy and sovereignty should be available to everyone, regardless of whether you have an internet connection, what you wish to trade or where in the world you wish to trade it.
Intents are completely programmable, meaning that users can create custom intents with as much or as little granularity as they like. Some examples of the sorts of programmable criteria users may use are:
- Expiry times: a user may only be interested in exchanging ETH for BTC if they can do so before their holiday; need to sell their festival tickets before the date of the event; or create a price quote on a rental car that is only valid for a period of time because it reflects information elsewhere.
- Asset bundling - a user may only sell their rare collectable card if the buyer is also prepared to rid them of multiple other, more common cards; need to sell items together for legal purposes; or want to sell assets that are synergistic together, such as two crypto-kitties that breed to produce an extra-rare crypto-kitty.
- Ranges - a user may want to trade their bike for any other model by the same brand; buy a house with a balcony at least 15m²; be willing to sell something for either 1 XAN or 5 BTC.
- Auctions - a user may want to sell their NFT artwork to the highest bidder; start the price on their wardrobe high and lower the price incrementally until someone accepts it; choose to allow someone to pay what they are able to afford.
- Multiple matches - a user may have 100 candles to sell, each at the same price; want to choose their buyer from a pool of interested parties; or sell all their BTC in increments until they run out of tokens.
- Standing orders - a user may want to donate a monthly stipend to a charity; pay for a new car in instalments; or pay recurring utility bills.
This is not to say that users won’t have predefined standards for their intents at their disposal. The team building Anoma will look to create more templates and validity predicates that instantiate common examples over time; however, these standards are not hard coded by the protocol. Users and gossip nodes can come up with new standards and gossip intents that instantiate those standards as they see fit, allowing different parts of the network to specialize in different kinds of bartering. While gossip nodes may enforce particular standards, there is no ledger consensus and the ledger does not enforce standards.
Giving users sovereignty over their financial data stands at the heart of Anoma’s technical design and, as such, privacy is another aspect of intents that can be freely customized. Achieving full privacy in the gossiping of intents is, nonetheless, a theoretical challenge. In order to discover and match with counterparties, users first need to disclose a certain amount of information about what they want. There are also some types of information that would benefit if users made them public, like exchange rates; instead of having to manually look up exchange rates over the internet, users could have access to information such as the average exchange rate used in their type of transaction.
In this sense, privacy in the intents gossiping system is a balancing act, and Anoma is continually exploring ways to provide users with highly flexible privacy options. Central to this effort is the development of ways to different kinds of zero-knowledge proofs and ZKP circuits. A likely scenario is that users will create their own private, virtual intent gossip systems in which to engage in multiple rounds of gossip, disclosing more and more information as the likelihood of being able to settle a barter increases. In the private virtual network, users will not create ‘intents’, per se, in that they may not be possible to settle directly against the ledger; rather, users may create proofs of some sort that disclose ownership of particular assets (or assets satisfying certain properties), and communicate information about what they want to receive in return. Once they have found probable or certain counterparties, one of the users in question combines the private information into a transaction, along with zero-knowledge-proofs that prove relevant properties of the private information so that the transaction may be settled on the Anoma ledger.
Understanding Anoma’s intent gossip and matchmaking system can aid understanding of what is meant by asset-agnostic bartering along with its significance for individual financial sovereignty. Through the gossiping and matchmaking of intents, Anoma enables users to discover and trade with people anywhere in the world over a single, private system in a way that was not available to them before. The intent gossip and matchmaking system can be used over various different physical instantiations, be it over bluetooth, app or internet browser, making it a viable trading platform across multiple physical contexts. With a high degree of flexibility, the system allows for wholly customisable intents, meaning it can be tailored to suit an indefinite number of use cases, including those that require differing levels of privacy - the tenet of Anoma’s vision.