FW Deposit & Redeem

Deposit tokens into FW to earn yield, and redeem FW shares back to underlying tokens.

Key references: FWBase.deposit, FWBase.redeem (and FWBaseUpg variants).

Details

  • Goal: Earn yield via FW shares; redeem later for base tokens.

  • Preconditions:

    • isValidTokenIn(tokenIn) and isValidTokenOut(tokenOut) must be true for the chosen FW.

    • Approve tokenIn to FW; set minSharesOut to guard slippage.

  • Notes:

    • Exchange rate increases from underlying yield; shares track proportional claim.

    • FW rehypothecates liquidity; see specific implementation (e.g., USDCFW).

Views and events

Views

  • FW: balanceOf(user), totalSupply(), exchangeRate(), previewDeposit(tokenIn, amount), previewRedeem(tokenOut, shares), accruedRewards(user).

Events

  • FW: Deposit, Redeem, ClaimRewards.

Last updated