Redemption
Redemption is a mechanism that allows nUSD holders to exchange their nUSD directly for collateral from the protocol at a slight discount. This feature helps maintain the peg of nUSD to $1 and provides an exit mechanism for nUSD holders.
How Redemption Works
For example, if you redeem 1,000 nUSD and the redemption fee is 0.5%, you would receive collateral worth 995 nUSD (1,000 nUSD minus the 0.5% fee).
Redemption allows you to exchange nUSD for underlying collateral at face value (minus fees), providing an arbitrage opportunity when nUSD trades below its peg.
Redemption Process
Key Components:
Redemption Function: Located in the vault contracts (BaseVault.sol), the main function is:
How it works:
Users can redeem nUSD by targeting a specific debtor's position
The redeemer pays nUSD and receives the debtor's collateral
A fee structure applies based on the debtor's collateral ratio
The debtor's debt is reduced by the redeemed amount
Checking if Redemption is Enabled/Disabled
You can check redemption status using these functions:
1. Check if redemption is enabled for a vault:
2. Check how much you can redeem from a specific provider:
From BaseVault.sol:
How to Execute Redemption
1. Calculate redemption first:
2. Execute the redemption:
Parameters:
debtor
: Address of the position you want to redeem againstnusdAmount
: Amount of nUSD you want to redeemminReceiveAmount
: Minimum collateral you expect to receive (slippage protection)
Redemption Process Flow:
Validation:
Ensures you can't redeem against your own position
Checks if the debtor has enough debt
Verifies redemption is enabled for the vault
Fee Calculation: Based on the debtor's collateral ratio:
Below bad collateral ratio: Base fee goes to protocol, no provider fee
Between bad and safe ratios: Proportional provider fee based on proximity to safe ratio
Above safe ratio: Higher fees with linear multiplier up to max collateral ratio
Execution:
Protocol fee (if any) is sent to the configurator
Remaining nUSD repays the debtor's debt
Collateral is transferred to the redeemer
Debtor's position is updated
Example Usage:
Notes:
Redemption provides an arbitrage mechanism to maintain nUSD's peg
Users with higher collateral ratios are more attractive redemption targets (lower fees)
The system prevents self-redemption
Redemption fees benefit both the protocol and the position provider being redeemed against
Redemption Fees
A redemption fee is applied when you redeem nUSD for collateral. In the Unstable Protocol:
The standard redemption fee is 0.5% of the redeemed amount
This fee is paid directly to the redemption provider whose collateral you're redeeming
The fee compensates providers for offering their collateral for redemption
For example, if you redeem 1,000 nUSD:
5 nUSD (0.5%) goes to the redemption provider as a fee
You receive collateral worth 995 nUSD
The fee structure is designed to:
Incentivize users to become redemption providers
Provide an arbitrage opportunity when nUSD trades below its peg
Ensure the system maintains sufficient redemption capacity
How Redeemability Status Works:
Vault-Level Configuration
Redemption is enabled/disabled at the vault level by the protocol owner:
Redemption Provider Status
Once redemption is enabled for a vault, any user with a debt position automatically becomes a potential redemption target. This is evident from the getRedeemableAmount
function:
Redeemability Criteria
A user automatically becomes a redemption provider if:
The vault has redemption enabled (
config.enabled = true
)They have an outstanding debt position (
getBorrowedOf(provider) > 0
)Their collateral ratio is within the allowed range (between 100% and
maxCollateralRatio
)
Last updated