$ETH Liquidity Pool Farm
You will learn how to interact with the ETH–USD Liquidity Pool + Farm strategy deployed on the Sepolia testnet. This strategy is designed to demonstrate decentralized liquidity provision and yield generation using Uniswap V3.
As a user, you will deposit ETH into the strategy contract. Upon deposit, the strategy automatically splits your ETH, converting half of it into USDC via the LiquidityManager contract. This ensures a balanced 50/50 ratio required for the ETH–USDC liquidity pool.
Once the assets are prepared, the LiquidityManager adds them to the Uniswap V3 pool, thereby providing liquidity. Over time, the pool simulates fee accrual as if it were generating real trading fees. These simulated fees represent your yield. The strategy periodically harvests these simulated fees and redistributes them to the Farm, from where they can be claimed by liquidity providers like yourself.
This strategy serves as a testnet demonstration of automated liquidity provisioning and yield farming using familiar assets ETH and USDC allowing you to observe how DeFi mechanics work in a safe, simulated environment.
Technical Flow
The operational flow of the ETH–USDC liquidity provisioning strategy. You will be guided through the process of depositing assets, simulating yield generation, harvesting rewards, and handling withdrawals.
Deposit & Liquidity Provision
ETH Deposit When you initiate a deposit, the Farm contract sends a specified amount of ETH to the strategy via the deployLiquidity function.
Token Splitting & Swap Upon receiving ETH, the strategy automatically splits the deposited amount approximately 50:50.
One half is retained as ETH.
The other half is swapped to USDC using the LiquidityManager.
Adding Liquidity With both ETH and USDC prepared, the strategy interacts with the LiquidityManager to add liquidity to the Uniswap V3 ETH–USDC pool at the 0.3% (3000) fee tier.
The resulting position is recorded and tracked within the strategy contract.
Yield Simulation and Reward Harvesting
Simulated Yield Generation Due to limited fee activity on testnets, the strategy simulates yield at a fixed APY of approximately 8%, calculated on the total liquidity deployed.
Reward Harvesting When the Farm triggers the harvestRewards function:
The strategy calculates simulated rewards based on time elapsed since the last harvest.
The corresponding ETH amount is then transferred back to the Farm.
Withdrawals and Emergency Handling
Standard Withdrawal If you initiate a standard withdrawal, the strategy removes the associated liquidity via the removeLiquidity function in the LiquidityManager.
The assets are then converted back to ETH and returned to the Farm.
Emergency Withdrawal In the event of critical conditions, you can invoke an emergency withdrawal.
This action instantly removes all liquidity from the pool and sends the recovered funds back to the Farm.
On-Chain Transparency
TVL & Rewards Visibility The strategy exposes the following view functions for transparency:
getStrategyTVL: Returns the current total value locked within the strategy.
getPendingRewards: Displays the yield accrued since the last harvest.
Technical Benefits
1. Enhanced Capital Efficiency
This strategy automatically splits the user's ETH deposit, swapping 50% to USDC to form a balanced 50:50 liquidity pair. By doing so, you are able to participate in a dual-sided liquidity pool, capturing trading fees from both assets and maximizing capital utilization across the pool.
2. Yield Generation Through DEX Fees
As a liquidity provider, you will earn simulated yield from DEX trading fees. Additionally, the strategy accounts for potential incentive rewards distributed through the Dexponent Protocol, further enhancing your overall APY within the Farm.
3. Simplicity for Testnet Demonstration
To help you evaluate the protocol’s behavior in a controlled environment, the strategy uses a fixed 50:50 token allocation, a predefined fee tier, and simulated yield generation. This allows for transparent observation of liquidity provision mechanics and yield accrual without unnecessary complexity.
4. Seamless Integration with Dexponent Protocol
The strategy is fully compliant with the FarmStrategy interface. When interacting with this contract, your deposits, withdrawals, and reward distributions are managed consistently with the Dexponent Farm system, ensuring a streamlined user and developer experience.
5. Robust Emergency Handling
In the event of abnormal or adverse conditions, the strategy includes a built-in emergency withdrawal function. This allows for the immediate retrieval of funds back into the Farm contract, adding an essential layer of operational security during edge cases.
Technical Highlights
You will be guided through the key components involved in token management, liquidity provisioning, and yield simulation on a simulated Uniswap V3 pool deployed on the Sepolia testnet.
LiquidityManager Integration
You will interact with a custom LiquidityManager contract designed to handle token swaps and manage liquidity operations. This component automates core steps of the strategy as follows:
ETH–USDC Swap: Upon deposit, the contract will automatically swap 50% of the deposited ETH into USDC using the simulated Uniswap V3 pool.
Liquidity Provisioning: After the swap, the strategy will provide ETH–USDC liquidity to the pool, enabling yield generation.
Liquidity Removal: During withdrawals, the contract will remove the corresponding share of liquidity and return the underlying tokens to the user.
Yield Simulation
The strategy simulates yield accumulation using a fixed 8% APY (expressed in basis points). As an LP, you will observe your yield accrue over time, calculated proportionally based on the amount and duration of your provided liquidity. This simulation enables predictable and transparent performance tracking within a testnet environment.
On‑Chain Metrics
To ensure visibility and transparency, the strategy exposes key view functions:
TVL: You will be able to query the current TVL in the liquidity pool.
Pending Rewards: The strategy allows you to view accumulated simulated rewards based on your participation.
These on chain metrics are accessible at all times and allow LPs to monitor performance and rewards in real-time.
Last updated