Madhavan Malolan

Posted on Aug 18, 2022Read on Mirror.xyz

Emit controls distribution

In web2, they who control the App on the users’ phones control the distribution.

But they who control the UI in web3 don’t necessarily control distribution.

Most of the UI is an interface to interact with smart contracts. Anyone can build a version of their own UI to interface with the smart contract. For example, you can use uniswap from uniswap.org, metamask, rainbow … all the same. They use the same smart contract underneath. So, even though the user interfaces are fragmented, the value is still accruing to the underlying smart contract - UniswapV3.

The way UIs are built in web3 are using indexers like Graph Protocol. Whenever an update happens on the smart contract, the update is reflected in Graph Protocol. Graph Protocol then gives a way for frontends to query and display this data.

For example, each time a swap or transfer happens on any Token, an event is emitted.

The indexer (like graph protocol) catches this emit and converts it into something that is query-able via an API. Many time implementing complex schemas, that are otherwise hard/impossible to do on the smart contract directly.

So indexers, naturally tend to index the main contract. No matter what UI you use to interact with that contract, globally people are using the same data - because of the contract that’s universally accepted as the one to be indexed.

When data is cheaply available, many interfaces can spring up. But all of them must adhere to the same index (aka subgraph) from the indexer - because that’s how they’ll have the latest data.

When they are adhering to the same indexer and subgraph, they are in turn adding value to the contract that is emitting those values. So the value will accrue to that contract that is emitting the events.

Counter examples are ofcourse people launching their own UI and contract - like sushiswap and 1inch.

But there is a new important role in the ecosystem to be the indexed contract. You can swap out uniswap and use sushiswap as your swapping mechanism and stay consistent with the events you’re emitting - so all the downstream products work as is while you redirect value accrual under the hood.