π²Integrating fxSAVE
To facilitate the integration of fxSAVE from any chain, Enso 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
Contract Addresses
RouterManagementFacet: 0x33636D49FbefBE798e15e7F356E8DBef543CC708
SavingFxUSDFacet: 0x56afB443dE36340c32f1a461605171992480059D
Function Call
Function:
instantRedeemFromFxSave (0x6d701088)Description: Burns fxSave shares and instantly converts them into the target token(s) (such as fxUSD, USDC, or a combination of fxUSD + USDC).
Function Signature
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
Contract Address
SavingFxUSD:
0x7743e50F534a7f9F1791DdE7dCD89F7783Eefc39
Function Call
Function:
After redeeming, you will receive the corresponding amount of fxSP tokens.
Step 2: Instantly Redeem fxSP Tokens to Obtain fxUSD and USDC
Contract Address
Function Call
Function:
Return Values
amountStableOut: Amount of stable token (fxUSD and USDC) receivedamountYieldOut: Amount of yield token received
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