Penumbra's DEX and the UM token

Now that the other aspects of the overarching economic system for Penumbra and their associations with the $UM token have been described, we can get into the meat of what Penumbra has to offer: a best-in-class Decentralized Exchange (DEX).

The way that Penumbra’s exchange functions makes for a dramatically different experience than what users have on other chains. This has mostly to do with the imperative to firstly, preserve user privacy, and secondly, utilize what economic value is exposed to the network as tools for making the network more useful. Penumbra does these by creating an economic environment that accommodates both those who want to swap and those who want to provide liquidity, ultimately making the UM token the center of that activity.

Trading and Swapping on Penumbra 

For users who want to swap, either for purposes outside of Penumbra or within it, in order to take advantage of Veil, the DEX trading experience, Penumbra treats all liquidity on the network as a unified pool. What this means for users is there is no need to check if certain liquidity is available on the network in the form of a pair they are seeking to trade for, only that the asset they are looking for exists as available in the first place. This means that on a practical level, as long as an asset:

  • exists on Penumbra in the form of liquidity for any asset, and 
  • has the depth to fill the demand of a trade’s intent,

the network will do the work of ensuring that there is a way to trade for the asset.

Every user transaction is treated as having equal authority from the perspective of the DEX, such that all transactions in a block are executed against one another and the available liquidity on the network. In effect, users get the best possible execution, provided there is necessary liquidity on the network to pull off their trade.

The network always offers traders total privacy when engaging with swaps on Penumbra. Any trade intent is shielded from the possibility of being ‘sniped’ by extractive fee markets on the part of block proposers that fulfill transactions. 

This works in two parts, both based on how Penumbra’s DEX works:

  1. Penumbra treats all trades as a unified set of transactions to solve against one another on a block-by-block basis for transaction execution.
  2. Penumbra executes these blocks of transactions as a batch at the end of a block, meaning that there is no way to deploy extractive strategies against incoming transactions.

This works because of how Penumbra treats liquidity on the network: as one big, deep pool.

Being a Liquidity Provider in Penumbra’s Shielded Liquidity Pool

The reason that Penumbra is able to offer a premiere experience to traders on the DEX is because of how it treats Liquidity Providers (LPs): with the exact same high level of exclusivity.

From the perspective of a LP, providing liquidity to Penumbra can be as simple or as complex as an LP would like for it to be - deploying one’s own strategies through the creation and management of complex curves and dynamic positions, to something as simply as a limit order done through the Veil front-end. (Learn more about how to provide liquidity on Penumbra here).

More important, however, is the fact that any LP on Penumbra can deploy these sorts of strategies while leaving it up to the DEX protocol to determine whether or not their liquidity is ‘best-priced’ for the use of a user, meaning that Penumbra solves for the ‘discovery’ problem. Every Liquidity Position on Penumbra is represented by a unique NFT that represents the information needed by Penumbra to utilize an LP’s positions in executing trades, all while keeping the identity of an LP’s owner anonymous. The DEX engine only utilizes the information it needs in order to execute trades against available liquidity.

How Penumbra executes across the DEX

Penumbra treats all liquidity present on the network as a single pool of assets rather than a constellation of individual liquidity pools that users have to seek out, as seen on most decentralized exchanges. The liquidity on the network is available to every trade. Penumbra’s swapping protocol traverses a ‘graph’ of all liquidity (represented in LP NFTs) in order to find the best routes, for the liquidity needed, by any set of trades.

This is where the DEX stays close to the UM token. When Penumbra seeks out any pricing imbalances between routes across the graph, it simultaneously executes on any profitable arbitrage between positions on these routes, then takes the difference in profit available between any of the pairs on the networks and swaps it for $UM. Finally, that converted asset is sent to a zero address, effectively pulling this $UM out of circulation.

This means that for the sum of all trades executed against the graph of available liquidity on the network, any arbitrage that would be claimed on an otherwise public orderbook is claimed by the protocol itself; with the value accruing to the protocol’s token. Since all transactions on the network are executed at the end of a block, there’s no way for people to extract from trade intents expressed within it by a user.

A Win-Win-Win Scenario

Penumbra is built not just for ease-of-use by those who want to trade on its DEX, but also as a means to make trading as profitable as possible for LPs, all while never compromising on the private information of users who interact with the network.

As any user’s transaction is presented to the network, the routes the protocol uses in order to execute on the intent effectively smooths out the impact of pricing curves put in place by all the LPs used in a transaction. This is done without revoking the profits guaranteed to the LPs in having expressed their strategy. 

As an example, if an LP prices their liquidity well but has an esoteric curve for how it was presented, it won’t matter to the user in the same way it won’t matter to the network: the LP will be executed against if it meets the requirements of the trade. This means that the LP gets the profits they wanted from the transaction, the trader sees their transaction executed, and the protocol creates the incentive for LPs to price their liquidity in accordance with what is in demand.

Finally, since the privacy model of Penumbra is compounded by activity on the network, this win-win-win scenario strengthens what Penumbra offers to every user: best-in-class privacy.

Incentives, and then incentives

Penumbra is well-suited to be a premier DEX for users, and not just because it is private. Penumbra avoids many of the shortfalls normally associated with other Decentralized Exchanges by specifically prioritizing its users, offering all those who use the network a chance to benefit from interacting with the protocol at its center and value accruing to the UM token.

With the practical incentives offered to those who want to trade with Penumbra made obvious, there’s still a question that needs to be asked, which will be answered in the next post.

Check out the DEX guide here: https://guide.penumbra.zone/dex