Move yield from L1 to L2

This guide explains the precise steps required to transfer real protocol yield from Ethereum (L1) to Arbitrum (L2) using the core contracts of the protocol.

Withdraw yield from the Distributor

function withdrawYield(
  uint256 rewardPoolIndex_, 
  address depositPoolAddress_
) external;

This function must be called for each active DepositPool that has pending yield. It transfers the accumulated yield for that pool from the Distributor contract to the L1SenderV2 contract.

Swap deposit tokens to wstETH

function swapExactInputMultihop(
  address[] calldata tokens_,
  uint24[] calldata poolsFee_,
  uint256 amountIn_,
  uint256 amountOutMinimum_,
  uint256 deadline_
) external onlyOwner returns (uint256) 

If the yield consists tokens like (e.g., USDC, wBTC... (not stETH)), they must be swapped into wstETH using this function.

Notes:

  • Uses a predefined Uniswap V3 multihop route (e.g., USDC → WETH → wstETH)

  • Can be called multiple times for different tokens.

  • Resulting wstETH will be retained on L1SenderV2.

Send wstETH to L2

function sendWstETH(
  uint256 gasLimit_,
  uint256 maxFeePerGas_,
  uint256 maxSubmissionCost_
) external payable onlyOwner returns (bytes memory)

This function finalizes the transfer process: it sends the swapped wstETH to the L2 protocol via Arbitrum Bridge.

Last updated

Was this helpful?