How Mangrove's Total Value Unlocked Redefines Capital Efficiency in DEXes
Improving the capital efficiency, data and fragmentation of DEX Liquidity
Today we dive into the future of AMM DEX, with Mangrove, who just launched its testnet on Polygon. The Mainnet launch is planned for early June.
Mangrove claims to be the First Programmable DEX, an “on-chain order-book-based AMM that allows Liquidity Providers (LPs) to post arbitrary smart contracts as offers”.
Imagine putting a sell order but without locking the assets, and still being able to use them on farming or lending protocols.
Offer-is-Code: a new Trading Approach
The Mangrove protocol is a permissionless and on-chain AMM DEX, where any user or contract “can post an offer signaling their willingness to sell up to a given quantity of assets at a given price”.
In fact on Mangrove, LPs will be able to post “smart offers” of liquidity, which are basically promises on liquidity in a smart contract. The liquidity promised can then be “shared, borrowed, lent, and all at the same time” when an offer is matched.
The LPs offers are sorted and displayed in an order book.
These offers “contains a callback address which the matching engine calls when the offer is effectively matched”.
In this way funds can generate yield elsewhere, avoiding capital lock-up.
On Mangrove, liquidity can be leveraged across multiple pairs to optimize trading potential. For instance, you can leverage your USDC liquidity to create offers on WETH/USDC, WMATIC/USDC, and WBTC/USDC pairs.
The introduction of an offer-is-code approach improves programmability for LPs and opens new trading strategies, such as:
Incorporation of defensive code to cancel offers if market conditions are unfavorable, and avoid price exposure leading to costly arbitrage.
Reactive liquidity: LPs can post offers that are not fully provisioned, as long as the code brings “the liquidity at match-time”.
Persistence: LPs can redisplay atomically their liquidity after a match, without latency, similar to what AMMs do.
What Problems Does Mangrove Solve?
Information & Data: AMM without order books lack updated information and the data typical of limit-order books. In turn, this can limit the appeal to more sophisticated liquidity providers and also leads to value lost to arbitrageurs;
Fragmentation: need to open a specific liquidity pool for each combination of assets that need to be swapped, leading to the less utilized pools having less liquidity (and more slippage);
Low Capital Efficiency: resulting from under-utilization of locked capital.
While we have now seen the benefits of providing liquidity in DeFi, there’s a strong need to push these tools forward and improve them.
Mangrove's conception of trading is to make it as much as possible similar to code and an IOU. The main purpose here is to shift liquidity from a locked commitment to an on-chain promise, with no need to lock up funds.
How does this work in practice?
Users on Mangrove will declare “their trading intentions”, with an on-chain offer of liquidity.
A market engine will run the code and check whether the promised liquidity is actually available
If it’s not, then users will have to pay a small compensation (or penalty), related to the fact that on the other side, there’s a user (taker) that triggered a gas fee to execute the unfulfilled order (as there’s no liquidity).
What does this mean in practice?
Traders can use those assets elsewhere without canceling the offer and recovering the funds.
The Offer-is-code is an advanced and more flexible version of a “limit order”. At the same time users can propose to sell crypto at a given price (limit order), BUT, at the same time, they also deposit those assets as collateral and generate yield.
According to Mangrove co-founder: using Mangrove “at the same time, you have a savings account and can sell at a certain exit price,” greatly improves capital efficiency of locked liquidity in DeFi.
No need to lock capital: Why waste yields when You can list your assets for sale and farm at the same time?
From Total Value Locked to Total Value Unlocked
Mangrove programmable order book allows LPs to place offers directly in code.
As we have mentioned above, there is no need to lock up the promised tokens upfront.
Why? By being coded each offer is composed of:
1. Sourcing: obtain the assets when the offer is matched
2. Persistence: repost itself on the book.
The sourcing is what allows liquidity to be shared, borrowed, or lent, and yet, at the same time, be displayed in a Mangrove book ready for trade.
In turn, this allows Mangrove to be more flexible than other AMMs, allowing users to develop sophisticated trading strategies and leverage pro-features such as AMM strategies, “partial liquidations, and carbon markets among others,
Furthermore, the promised liquidity is not binding, as LPs can cancel their offer at any time if they deem the terms to not be favorable.
The liquidity is, in fact, unlocked and fully utilized all the time.
Food for Thought
This is an interesting model that greatly improves the capital efficiency of DeFi, as well as reduces the cost of liquidity.
Mangrove is pushing hard to solve the inefficiencies of liquidity and collateral provision. There’s no need for liquidity to be on a CEX/DEX, as it can be sourced directly from other pools or protocols once the order in the order book is matched.
LPs won’t have to lock their funds and will have greater flexibility in their strategies.
Mangrove is built to be “a DEX where market makers could operate without locked capital”. At scale, the benefits of having such a model in place could be enormous for DeFi.
Bonus Paragraph
Testnet
Early testnet users will be eligible to redeem special NFTs.
Investors and Fundraising
Mangrove raised over $10 million: a Series A fundraising of USD 7.4 million and a seed funding round of USD 2.7 million in July 2021.
The lead investors are Cumberland, Greenfield Capital, and Wintermute Ventures, all established trading and market maker players.