# LiquityRedeem

### Description

Action for redeeming Trove in Liquity

> **Notes**
>
> Redeems ETH(wrapped) using LUSD with the target price of LUSD = 1$

### Action ID

`0xd89acd5c`

### SDK Action

```ts
const liquityRedeemAction = new dfs.actions.liquity.LiquityRedeemAction(
    lusdAmount,
    from,
    to,
    firstRedemptionHint,
    upperPartialRedemptionHint,
    lowerPartialRedemptionHint,
    partialRedemptionHintNICR,
    maxIterations,
    maxFeePercentage
);
```

### Action Type

`STANDARD_ACTION`

### Input Parameters

```solidity
    /// @param lusdAmount Amount of LUSD tokens to redeem
    /// @param from Address where to pull the tokens from
    /// @param to Address that will receive the tokens
    /// @param firstRedemptionHint First hint for finding a redemption
    /// @param upperPartialRedemptionHint Upper hint for finding a redemption
    /// @param lowerPartialRedemptionHint Lower hint for finding a redemption
    /// @param partialRedemptionHintNICR Partial redemption hint NICR
    /// @param maxIterations Maximum number of iterations
    /// @param maxFeePercentage Maximum fee percentage
    struct Params {
        uint256 lusdAmount;
        address from;
        address to;
        address firstRedemptionHint;
        address upperPartialRedemptionHint;
        address lowerPartialRedemptionHint;
        uint256 partialRedemptionHintNICR;
        uint256 maxIterations;
        uint256 maxFeePercentage;
    }
```

### Return Value

```solidity
return bytes32(ethRedeemed);
```

### Events and Logs

```solidity
emit ActionEvent("LiquityRedeem", logData);
logger.logActionDirectEvent("LiquityRedeem", logData);
bytes memory logData = abi.encode(params);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.defisaver.com/actions/liquity/liquityredeem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
