Kandel extends Mangrove’s decentralized liquidity model by enabling users to source liquidity directly from any DeFi protocol without pre-locking assets. Leveraging Mangrove’s unique “Offer-is-Code” architecture, Kandel activates liquidity precisely at execution, allowing users to seamlessly tap into multiple yield sources like Aave or AMM pools. This reactive approach not only optimizes capital use but also enhances profitability and flexibility, setting new standards in DeFi liquidity management that outperform traditional AMMs under specific strategies.
Mangrove distinguishes itself through its innovative "Offer-is-Code" architecture, which allows for embedding code directly into each offer. This unique design enables the inclusion of custom code that can enhance offers with advanced functionalities like liquidity sourcing.
Liquidity sourcing is a feature of Mangrove's reactive liquidity model, allowing liquidity to be drawn from external DeFi protocols and mobilized precisely at the moment of trade execution. This approach maximizes efficiency and flexibility, highlighting Mangrove's role as a non-rival, highly adaptable liquidity platform.
The Mangrove team has implemented several liquidity routers available to developers, some of which are integrated into the dApp UI. By adding your own code to your offers, you can source liquidity from any permissionless DeFi protocol.
Imagine that your assets are deposited in a DeFi protocol. You can use this capital on a Kandel grid, and it will only mobilize your liquidity when an order is executed. There's no need to move or lock up your funds in anticipation of a transaction.
This optimizes your capital use and addresses a major issue in DeFi: interoperability between protocols. By using Kandel’s liquidity sourcing, you can take advantage of opportunities across multiple protocols without having to lock your assets on each one.
Let's begin with a simple example of liquidity sourcing on Mangrove's order book.
Imagine Alice, who has supplied 1 WETH on Aave. She wishes to sell 1 WETH if the price reaches 3,000 USDC. During the configuration of her order, she selects Aave as her liquidity source [Step 1]. On Mangrove, a limit order is placed to sell 1 WETH at that price [Step 2].
When the price of WETH reaches 3,000 USDC and the order is executed, Mangrove automatically retrieves the WETH from Aave, sends it to the taker, and Alice receives 3,000 USDC in exchange.
This way, Alice was able to keep her WETH on Aave—earning yield for supplying liquidity—until the exact moment the transaction took place.
Alice can also set up a Kandel strategy and source liquidity from her loans on Aave. For example, she might supply USDC to one Aave market to earn supply rates and incentives, and supply WETH, benefiting from both supply rates and additional incentives. She can then create a Kandel strategy using the WETH/USDC pair, where each asset sources its liquidity directly from each respective Aave loan.
The liquidity, along with the profits, will then be reposted through the Kandel process.
The AaveKandel smart contract sources liquidity from Aave as needed, allowing WETH/USDC offers to be posted without locking assets upfront, thereby maximizing returns through Aave’s yield-bearing assets.
This Kandel strategy with Aave has been fully coded and audited, ensuring secure and reliable performance.
Below is a summary of the profits made:
In a lending/borrowing-based carry trade strategy, the idea revolves around taking advantage of the platform’s collaterals native yield while leveraging the position.
The concept remains rooted in the classic carry trade principle: "borrow low, lend high." Here’s how it would work:
Borrowing: You borrow an asset, such as ETH, from a lending/borrowing platform at a certain borrowing rate b.
Supplying Collateral: You simultaneously supply another asset, such as wstETH, back to the platform, earning a supply rate s0, along with additional rewards on the collateral provided.
The key aspect in this loopy strategy is that it allows leverage (i.e., "loops" of borrowing and supplying), AND the collateral itself earns rewards. This means the gap between the supply rate and borrow rate:
δs := s0 − b > 0
also leads to profitability thanks to the added collateral rewards.
Even if the supply rate s0 is not significantly higher than the borrowing rate b, additional platform incentives on the collateral can enhance total returns, making this strategy viable.
The position is built using USDC as initial capital, with a long position in wstETH and a short position in ETH. This setup is designed to be neutral to fluctuations in the USD price of ETH, although interest flows are in ETH, making it sensitive to ETH price variations if calculated in USD.
Deposit USDC at t0
Borrow ETH creating an initial credit line (A).
A = (x : USDC | y : ETH)
y ' : wstETH with q(t0)y ' = y
A' = (fy ' : wstETH | z : ETH)
with f, the amplification of the initial position,
and with z=(f-1)y to make sure that the position is self-financing.
The additional return per unit of time is the ‘spread’ i.e. the difference between the stacking yield and cost of borrowing. All this can be managed with a customized Kandel strategy using Mangrove’s liquidity sourcing.
The mechanisms behind Kandel liquidity sourcing can be extended to other areas:
AMM Pools: You can source liquidity from an Automated Market Maker (AMM) pool, earning fees and potentially farming incentives.
Multi market Kandel: You can also duplicate an existing Uniswap v3 AMM pool on Kandel in order to profit from orderflows coming from both exchanges (Uniswap and Mangrove).
For Token Issuers: Your liquidity can be multiplied by sourcing from both a liquidity pool and Mangrove. This dual sourcing improves liquidity depth and availability for the token, benefiting both the issuer and the traders.
Kandel with a single side deposit : You can deposit the quote token then borrow, and source the liquidity for the other token. It can be very useful if the second one is the most volatile.
An hedged Kandel: You can use options or other hedging instruments in order to limit losses.
Indeed, any source of yield that can be unwound within a block time can be connected to Mangrove and associated with a Kandel strategy. This includes various DeFi protocols and yield-generating assets. By integrating these sources, you can enhance your strategy's profitability and flexibility. You can therefore further refine your strategy and make your capital more efficient.
We invite DeFi strategists to explore the extensive possibilities of developing new Kandel strategies on Mangrove. The Kandel codebase is open-source, providing a flexible foundation for innovation. There are numerous ways to enhance their yield—such as advanced liquidity sourcing—and improve performance through features like exit bots and hedging mechanisms.
Moreover, there's an opportunity to be remunerated for designing and implementing new routers for Kandel or creating new versions of the strategy. Your contributions can significantly impact the DeFi ecosystem by advancing liquidity provision techniques and optimizing capital efficiency.
Next Steps
Dive into Mangrove's Documentation: Learn how to develop custom Kandel strategies and integrate various yield sources.
Collaborate with Us: Reach out to our team for support and guidance in your development efforts. We're here to assist you in bringing your innovative ideas to life.
Contribute and Earn: Explore opportunities to be compensated for your work on new Kandel routers and strategy enhancements.
Join the Community: Connect with other DeFi strategists, share insights, and contribute to the interoperable DeFi ecosystem.
If you're interested in developing new Kandel strategies or have ideas to enhance existing ones, we'd love to hear from you.
🌐 Contact us on Twitter and join our community on Telegram and Discord.