âī¸Liquidity Providers
Incentives
Maximize: swap fees, non-toxic order flow
Minimize: toxic order flow, uncompensated MEV
Liquidity providers are the lifeblood of the DeFi system. Uniswap V2 full-range LP unlocked a lot of new features like composable LP positions in other protocols, price discovery of new tokens, and the ability to passively LP.
IL & Liquidity Providers
It is well known that passive liquidity providers (LPs) tend to get a raw deal on AMMs today. They are exposed to adverse selection and usually not compensated enough in trading fees from uninformed flow to make up for it.
Drawbacks of LPing on Uniswap V3
In a TWAMM, all of the price-insensitive long-term flow goes through the LP pool which accrues trading fees. Note that profits earned and fees incurred by arbitrageurs are implicitly paid for by the long-term order, in the form of slippage.
Understanding Toxic Order Flow
Identifying toxic order flow and attracting large uninformed (non-toxic) order flow is the holy grail for market makers and liquidity providers. However, this is a hard problem for DEXs to solve without adding gas-inefficient on-chain logic or relying on off-chain computations.
In most DEXs, all swaps go through the same interface and fee bucket as shown in the diagram above. In this scenario, passive liquidity providers eat the toxic order flow because arbitrageurs exploit outdated pool prices without compensating LPs with the commensurate MEV extracted.
Dual Swap Paradigm
Our TWAMM implementation has an elegant incentive structure baked in:
The short-term swap interface is somewhat more costly gas-wise than a Uniswap V2 swap and will primarily be used to correct pool prices by arbitrageurs. So, we collect and pass on a portion of the MEV extracted via a proprietary arbitrageur swap interface.
The long-term swap interface proxies trades that happen over multiple blocks & are inherently uninformed non-toxic flow. This user pays a standard low fee that outcompetes incumbents like OTCs on fees, and other implementations on gas costs.
Full Range Liquidity + MEV Resistance
Democratizing the Edge for Passive LPs
Now that we have a DeFi protocol that has built-in MEV extraction and novel trade execution for large uninformed order flow, we are finally able to even the playing field for passive LPs providing full range liquidity.
Sophisticated market makers have been hedging the downside of providing liquidity in DEXs by arbitraging the very same pools. With our TWAMM implementation, passive LPs will be able to hedge against impermanent loss by collecting and automatically re-investing MEV rewards from arbitrageurs.
Automatic MEV Re-investment
An important part of our implementation is a design feature that transfers a portion of MEV tokens (WETH) from arbitrage partners to LPs. The design balances gas use and composability while eliminating the incentive to use flash loans for just-in-time liquidity attacks to capture MEV rewards.
How to use
Code Example
There are more examples in the public repo: https://github.com/Cron-Finance/v1-twamm/tree/main/contracts/twault/scripts/helper
Periphery
Who needs this?
đ¸Yield AggregatorsđĒAirdrops DamperToken Price Discovery
DAO Treasuries
Retail & Passive LPs
Last updated