DLPRewardSwap

This contract is a helper for the DLPRewardDeployer that manages the complex swap and liquidity operations needed to convert VANA rewards into optimized DLP token liquidity positions.

This smart contract serves as a specialized helper for the DLPRewardDeployer contract, managing the complex swap and liquidity operations required for VRC-14's reward distribution mechanism. When the DLPRewardDeployer triggers a daily tranche distribution, it calls this contract to handle the intricate process of converting VANA tokens into optimal DLP token liquidity positions. The contract's primary function, splitRewardSwap, takes incoming VANA rewards and intelligently splits them according to a configurable percentage - part of the VANA is converted to the DLP's native token and sent directly to the DLP's treasury as a reward, while the remaining portion is used to add liquidity to the VANA/DLP token pool by executing precise swaps and liquidity provision operations.

The contract employs sophisticated optimization algorithms to determine the optimal swap amounts that maximize liquidity provision while respecting slippage constraints set by the DLPRewardDeployer. It uses binary search techniques to find the perfect balance between swapping VANA for DLP tokens and adding liquidity, ensuring that the resulting liquidity position uses the maximum amount of available tokens while staying within acceptable price impact limits. The system handles all edge cases where the current price is outside the liquidity range, automatically adjusting the strategy to provide single-token liquidity when appropriate, and returns any spare tokens that cannot be efficiently used back to the treasury through the DLPRewardDeployer's specified recipients.


📘

Contract Address

Moksha: 0x7c6862C46830F0fc3bF3FF509EA1bD0EE7267fB0

Vana Mainnet: 0x7c6862C46830F0fc3bF3FF509EA1bD0EE7267fB0