Lido stETH Yield Farm
This guide walks you through using the Lido stETH Yield Strategy step by step, focusing on what you need to do to manage your funds and rewards.
Last updated
This guide walks you through using the Lido stETH Yield Strategy step by step, focusing on what you need to do to manage your funds and rewards.
Last updated
This strategy outlines the operational mechanics of the Lido stETH Yield Strategy as implemented within the Dexponent Farm framework. The strategy supports Wrapped Ether (WETH) as its principal token, which is deposited into Lido’s staking contract on the Ethereum network. The process initiates with the unwrapping of WETH into native ETH, followed by the invocation of Lido’s submit() function. This action results in the minting of stETH, which is subsequently credited to the strategy contract.
On the Ethereum mainnet, stETH is designed to automatically rebase, adjusting its balance to reflect accrued staking rewards. However, within this deployment, such rebasing functionality is not simulated. To address this, the strategy incorporates a yield simulation mechanism engineered to approximate an APY of 4% on the stETH balance. This simulation ensures that the strategy can emulate staking derived returns in a controlled environment.
Upon execution of the Farm’s harvest function, the strategy computes the “excess” stETH generated from the simulated yield. This excess is then converted to WETH through an aggregator integrated via the LiquidityManager module. The resulting WETH yield is subsequently returned to the Farm for further processing or distribution.
To stake your liquidity, follow these steps:
i) Transfer your Wrapped Ether (WETH) from the liquidity pool to the strategy module.
ii) The system will unwrap your WETH into ETH and stake it in Lido using submit(0x0) to mint stETH.
iii) Check the strategy module to confirm your stETH balance is recorded as your starting point.
To simulate yield on your staked assets:
i) Trigger a harvest or withdrawal to calculate your 4% APY based on time since the last update.
ii) Watch for the system to log your simulated yield via an event notification.
iii) (Optional) For testing, use an external script or wallet to send extra stETH to the strategy module.
To collect your rewards:
i) Run the harvest function to simulate your yield and update your stETH balance.
ii) The system will swap any extra stETH (above your starting balance) to WETH using the liquidity aggregator.
iii) Confirm the WETH is sent to the liquidity pool as your harvested yield.
To pull your funds out:
i) Request a withdrawal and specify how much stETH to convert.
ii) Wait for the system to swap your stETH to WETH via the aggregator.
iii) Verify the WETH is transferred back to the liquidity pool
To pull your funds out:
i) Request a withdrawal and specify how much stETH to convert.
ii) Wait for the system to swap your stETH to WETH via the aggregator.
iii) Verify the WETH is transferred back to the liquidity pool.
This strategy integrates directly with the official Sepolia stETH contract deployed at 0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af.
You must ensure this address is valid and up to date in your deployment. All staking and yield operations will interface with this contract to simulate Lido's staking behavior.
To facilitate conversions between stETH and WETH, the strategy relies on an external liquidity manager or aggregator.
You are required to configure this liquidity manager to perform swaps, which are essential for executing withdrawals and harvesting yield. The liquidity manager must support stETH ↔ WETH routing with minimal slippage.
This strategy includes a built-in simulation engine that emulates a 4% APY. Yield is calculated based on the time elapsed since the last yield event. Note that this simulation does not automatically modify stETH balances. Instead, it emits simulation events which can be picked up by external scripts or manual test tools.
You should use these events to trigger balance adjustments during testing or emulation.
All core interactions like deposits, withdrawals, and yield harvesting are restricted using the onlyFarm modifier. This ensures that only the associated Farm contract has permission to invoke these critical functions. Before deployment, confirm that the correct Farm contract address is set, as unauthorized access is blocked at the contract level.
By depositing WETH into the Farm, you initiate a non-custodial staking workflow. Your assets are routed to Lido for Ethereum staking, allowing you to passively earn staking rewards. At all times, you maintain full control and ownership over your funds.
Once you deposit the assets, the Farm automatically handles fund routing, staking operations, and reward distribution. No manual intervention is required on your part. This seamless integration with Dexponent’s core protocol ensures easy and secure management of your deposit from start to end.
Before committing any funds, you are provided with a simulated yield model. This model offers an estimate of the rewards you could earn, based on historical staking data and validator performance. This allows you to make an informed decision before initiating the staking process.