πŸ’²Integrating fxSAVE

To facilitate the integration of fxSAVE from any chain, Ensoarrow-up-right routed it. You'll find more information here.

Note that since fxSAVE withdrawal is a two-step process, Enso only routed the atomic withdrawal that charges a withdrawal fee. To avoid that fee, you can wait for the cooldown period instead.

Method 1: Direct Redemption via Router

function instantRedeemFromFxSave(
    LibRouter.ConvertOutParams memory fxusdParams,
    LibRouter.ConvertOutParams memory usdcParams,
    uint256 shares,
    address receiver
)

  • Parameter Struct Description (ConvertOutParams)

ConvertOutParams Example

ConvertOutParams defines how assets redeemed from fxSave are converted (swapped) into the target token, such as USDC, fxUSD, or USDC+fxUSD. Below are three typical usage scenarios:


βœ… Scenario 1: Redeeming USDC

In this case:

  • fxUSD needs to be swapped into USDC via the converter.

  • USDC is redeemed directly without swap.

fxusdParams (Swap fxUSD β†’ USDC)

usdcParams (Direct Redemption of USDC)


βœ… Scenario 2: Redeeming fxUSD

In this case:

  • fxUSD is redeemed directly without swap.

  • USDC needs to be swapped into fxUSD via the converter.

fxusdParams (Direct Redemption of fxUSD)

usdcParams (Swap USDC β†’ fxUSD)

βœ… Scenario 3: Redeeming USDC + fxUSD(No Swap)

In this case:

  • fxUSD is redeemed directly without any swap.

  • USDC is redeemed directly without any swap.

fxusdParams (Direct Redemption of fxUSD)

usdcParams (Direct Redemption of USDC)


Method 2: Two-Step Redemption Process to Get fxUSD + USDC

Step 1: Redeem fxSP Tokens from fxSave


Step 2: Instantly Redeem fxSP Tokens to Obtain fxUSD and USDC


Summary

Method

Description

Features

Method 1

Direct redemption of fxUSD, USDC, or both via Router

Single-step process; suitable for flexible and immediate conversion

Method 2

Two-step redemption: first redeem fxSP, then extract fxUSD and USDC

Fine-grained control over redemption; suitable for detailed asset management


Last updated