Zeus Swap Whitepaper
Decentralized exchanges (DEX) are DeFi protocols that enable the exchange of crypto assets using smart contracts. Unlike traditional exchanges that use order books to match buyers with sellers, these smart contracts allow peer-to-pool trades with a simple pricing formula called an Constant Function Market Maker (CFMM). CFMM formulas enable the creation of liquidity pools that are used by traders to swap cryptos. There are few different variations of DEXs but fundamentally they all work similarly. It is important to have a basic understanding of CFMM works to be able to see the benefits of the Zeus Swap.
The notion of DEX came into our lives with Uniswap and its subsequent forks. Uniswap v2 enabled ERC20 token swaps and gave birth to the infamous DeFi Summer. The beauty of Uniswap lies in its simplicity. It is simple enough for most people to understand and use. Moreover, all operations that are performed on-chain require a gas fee so it’s paramount to make smart contracts as lightweight as possible. However Uniswap’s simplicity comes with some fundamental issues for the main actors that use the protocol: Liquidity Providers and Traders.
Traders using Uniswap incurred a lot of slippage because of the fixed pricing formula. On the other hand LPs incurred a lot of divergence loss which is the equivalent of adverse selection resulting from the structure of the AMMs. Only sophisticated actors called arbitrageurs and some sophisticated LPs were able to truly profit from Uniswap v2 type AMMs
In order to reduce slippage, Curve changed the AMM formula to make it better for creating stablecoin pools that could be used to trade with low fees and low slippage. Curve’s new AMM formula enabled certain types of liquidity pools much more efficiently than their competitors. It was now possible to swap large amounts with minimal slippage. Albeit it was only possible to swap between similarly priced assets like Stablecoins or wrapped assets(e.g. sETH-ETH)
Curve also introduced tripools which allowed the creation of liquidity pools containing an equal dollar amount of three crypto assets. On top of that, the platform also introduced metapools, which enabled the trading of a fourth asset with the three assets in an underlying tripool.
Curve’s lower trading fees and new liquidity pool types made it one of the top destinations for trading stablecoins and synthetic assets. This is because liquidity providers could deposit their cryptos without taking on as much risk and traders could save money on swapping fees while experiencing significantly less slippage. This brought the golden age of decentralized stablecoin trading. However Curve only focused on stable swaps and traders still had to go to CFMM DEXs like Uniswap or Balancer to swap between non-stable crypto assets.
Balancer addressed a different issue than optimizing the AMM function. They enabled the creation of liquidity pools with up to eight cryptos as well as the ability to customize the proportion of crypto assets in a pool.
This means that instead of having liquidity pools be split 50:50 of two tokens, weighted pools on Balancer could be made up of any proportion of as many as eight cryptos. Hence, liquidity pools on Balancer are no longer limited to just three crypto assets nor are they bound by the constant product formula forcing pools to maintain an equal percentage of each tokens.
Limitations of the AMMs
Before the introduction of Concentrated Liquidity, most of the AMMs made limited improvements in liquidity utilization and capital efficiency. If we regard the example of offchain orderbook engines as ideal, Concentrated Liquidity is one step closer to it than all other AMMs.
Most of the problems with AMMs are interconnected and have second order effects on each other. For example low utilization of liquidity results in more price impact which causes a net loss for traders. This compels traders to look for other avenues lowering the volume and fees for LPs.
There is also a chicken-egg problem prevalent for all DEXs where they need deep liquidity in order to attract trading volume however traders need deep liquidity to trade. Below we list the most prominent issues present in the Uniswapv2-type AMMs.
Large slippage and price impacts for traders due to inefficient deployment of liquidity
For traders, swapping against a pooled reserve based on CFMM pricing is not optimal. It is a subpar experience compared to CEXs which are quite efficient in price discovery via orderbook engines. Firstly, traders are forced to be takers and have no option to be a maker.
Also as it is very costly to operate an orderbook on-chain, DEXs follow a different approach for price discovery, namely a linear function called constant product formula. This approach is much more cost-effective than on-chain order books however it comes at the cost of traders by incurring large slippages & price impacts. CEXs with orderbook models can offer much better rates to traders, especially with large trades.
Capital inefficiency and low utilization of liquidity
For Liquidity Providers, the only option to benefit from swap fees was to add liquidity to a pool in equal dollar amounts and hope that prices wouldn’t diverge too much while there is a high trading volume. While this enables fungibility, it also results in inefficiencies.
In reality, swaps take place in a limited price range as opposed to an infinite range implied by the Univ2 type DEXs. Spreading liquidity over an infinite range means most of the liquidity is never utilized! As a consequence, LPs would earn less yield per total capital they deploy as they cannot concentrate their liquidity around the ranges where the actual price action happens. Instead, they provide liquidity evenly from 0 to infinity, disregarding the fact that % 90 of this range will probably never see any price action.
Imagine creating limit orders on a regular order book exchange, but instead of choosing some place near the current price, you spread your orders over prices so far out that they would never get executed. It surely wouldn’t be the best use of your capital! Uniswap v2 and other CFMM type DEXs do exactly that, deploy capital to price ranges that will never be utilized.
Limited customization in liquidity provision
In Univ2 type AMMs, as an LP you can only participate in the same curve as everyone else, making it impossible for anyone to have any advantage over others. This was an intentional design to make liquidity provision fungible however it limit’s the LPs who could have developed sophisticated strategies in liquidity provisioning.
This resulted in rigidness and inability to react in face of evolving market regimes as the only action a LP could take was adding and removing liquidity. Another big limitation was that LPs only had one fee% option. All assets have differing market profiles and price discoveries tailored to their fundamentals which makes it impossible for a single fee to fit them all.
Low ROI for LPs
In Univ2 type AMMs, LPs earn trading fees based on their contribution to the total liquidity available in the pool. Since all of the LPs used to provide liquidity over an infinite range, which resulted in low utilization of liquidity, they were earning a lot less compared to what they may be able to earn via Concentrated Liquidity.
As crypto volatility is notoriously high, LPs also incurred impermanent loss resulting from the pricing mechanism of AMM(similar to adverse selection). The trading fees usually didn’t cover the loss due to impermanent loss, resulting in a net loss for LPs. Many of the protocols tried to mitigate this by distributing Liquidity Mining rewards which essentially “rented” the liquidity of LPs. The success of DEXs and many other DeFi projects is largely attributable to these rewards provided.
Concentrated Liquidity: How it solves the major issues of AMMs
The core cause of low liquidity issue is as follows: while liquidity is provided to all price ranges from zero to infinity, price action takes place only in particular price ranges. As a resolution to this, Uniswap suggested the concept of ‘concentrated liquidity’ when it launched V3.
The idea behind it was to let LPs set custom price ranges and provide concentrated liquidity to those ranges. This enables more liquidity to be proactively utilized in actual swaps instead of staying dormant.Since the liquidity is much more efficiently utilized near the ranges where the price action is more likely to happen, price impacts are lower in CLMMs for the exact same amount of liquidity compared to v2 type AMMs.
Zeus Swap is a next generation Concentrated Liquidity DEX that is highly capital efficient in it’s design. There is no more dead liquidity staying dormant(unless you choose so) and all liquidity is concentrated around where the actual price action happens — a step closer to the design of orderbook engines.
LPs have the option to choose custom price ranges to concentrate their liquidity around. They can still choose to provide over an infinite range and replicate the exact same structure of Uniswapv2 if they choose so.
LPs in CL-DEXs earn fees based on price action happening inside the ranges they provided liquidity to. The more liquidity deployed per price tick, the more fees are earned. When price goes out of range, LP positions stop earning any fees. This could potentially act as a stop loss, which can be used to limit downside risk.
NFTs as LP Tokens
In the V2-type liquidity provision model, all LPs add liquidity to an identical price range (zero to infinity) and provide 2 different tokens at identical ratios. This made all LP positions fungible which has a lot of benefits like easy distribution of fees and being able to incentivize with external token rewards.
With Concentrated Liquidity, LPs now set custom ranges for their liquidity which makes it impossible for their position to be represented with fungible tokens like ERC-20. All provided liquidity will be unique because of it’s custom price ranges + custom amount therefore the liquidity provided will have to be represented by unique and non-fungible tokens.
Zeus Swap offers multiple fee tiers in creating liquidity pools. LPs can choose to create pools with low fees for pairs that have less volatility to drive in more trading volume or choose higher fee tiers for pairs that they would expect to be highly volatile to compensate for the risk they are undertaking.
It is expected that eventually all LPs and Traders will settle on certain fee tiers for particular pairs based on the characteristics of the underlying tokens and their price actions.
Distributing rewards was much easier when all liquidity provision was fungible. LPs would get fungible ERC20 tokens representing their share of the pool and everyone could get pro-rata rewards from a staking contract. However with LP tokens as NFTs, it is much harder to decide on who gets how much reward.
Zeus Swap introduces a novel farming mechanism based on how much of your liquidity is actually utilized. LPs will receive rewards based on the amount of time spent LPing and total ticks utilized. This also makes the rewarding process much more efficient as LPs who take on more price risk will be rewarded more than the ones who provide liquidity to safer ranges.
Easy UX for liquidity provision
Liquidity provision into CL-DEXs can be intimidating. In CFMM DEXs everyone provides liquidity the same way, so all losses and profits are socialized. With Concentrated Liquidity LPs have the option to create custom price ranges and it can be difficult for users that seek to invest more passively.
Zeus Swap addresses the issue with Passive LP experience similar to CFMM DEXs. Users will have the option to either select custom price ranges or provide liquidity easily using pre-selected ranges.
Traders can utilize Zeus Swap Liquidity Provision for swapping tokens. Liquidity Provision to CLMM dexs can be seen as “wide limit orders” that takes place over a range of ticks. A trader who wishes to buy ETH with USDC when ETH price slightly drops, can provide liquidity in a very narrow range to Zeus Swap ETH-USDC pool, just below the current price of ETH. This will act in a similar fashion to limit orders. When price goes down to the range specified by the trader, the USDC will start to be converted to ETH by virtue of the pricing function. When price reaches the lower bound, %100 of the USDC position would be converted to ETH.
However this can be even better than a regular limit order in a CEX because as you provide liquidity, you earn trading fees rather than paying! So range orders will act as wide limit orders that earn you trading fees.
What’s next for Zeus Swap ?
Our first mission is to enable capital-efficient trading via concentrated liquidity in Metis ecosystem. We believe token trading is one of the most fundamental building blocks in DeFi. However, it is either largely inefficient or very hard to use compared to CEXs. We firstly aim to contribute to the adoption of CLMM DEXs by lowering the barriers of entry via improving the user experience for both LPs and Traders.
There will be lots of opportunities to earn yield through Zeus Swap. Stay updated through our Discord for new developments.