DeFi Saver
Search
⌃K

LiquityClaim

Description

Action ID: 0xd89acd5c
Network mainnet: (Deployed address | Code)
Redeems ETH(wrapped) using LUSD with the target price of LUSD = 1$

SDK Action

const liquityRedeemAction = new dfs.actions.liquity.LiquityRedeemAction(
truncatedLUSDamount,
from,
to,
firstRedemptionHint,
upperHint,
lowerHint,
partialRedemptionHintNICR,
0,
maxFeePercentage,
);

Contract

This is a DFS STANDARD_ACTION.
The address from which we are pulling LUSD must approve proxy to pull tokens
if lusdAmount is uint.max supply whole balance of LUSD
Input:
/// @param lusdAmount Amount of LUSD to redeem for
/// @param from Address from which to pull LUSD
/// @param to Address that will receive redeemed ETH
/// @param firstRedemptionHint hints at the position of the first Trove that will be redeemed from,
/// @param upperPartialRedemptionHint hints at the nextId neighbor of the last redeemed Trove upon reinsertion, if it's partially redeemed
/// @param lowerPartialRedemptionHint hints at the prevId neighbor of the last redeemed Trove upon reinsertion, if it's partially redeemed
/// @param partialRedemptionHintNICR ensures that the transaction won't run out of gas if neither _lowerPartialRedemptionHint nor _upperPartialRedemptionHint are valid anymore
/// @param maxIterations The number of Troves to consider for redemption can be capped by passing a non-zero value as _maxIterations, while passing zero will leave it uncapped
/// @param maxFeePercentage The borrower has to provide a _maxFeePercentage that he/she is willing to accept in case of a fee slippage
struct Params {
uint256 lusdAmount;
address from;
address to;
address firstRedemptionHint;
address upperPartialRedemptionHint;
address lowerPartialRedemptionHint;
uint256 partialRedemptionHintNICR;
uint256 maxIterations;
uint256 maxFeePercentage;
}
Return value:
return bytes32(ethRedeemed);
Events:
emit ActionEvent("LiquityRedeem", logData);
​
logger.logActionDirectEvent("LiquityRedeem", logData);