# PendleTokenReedem

### Description

Redeems PT tokens for underlying tokens after maturity. E.g PT-eUSDE-{date} -> eUSDE

> **Notes**
>
> This action performs two steps:
>
> ```solidity
> /// 1. First convert PT token to SY token
> /// 2. Then convert SY token to underlying tokens
> ```

### Action ID

`0x3de77432`

### SDK Action

```ts
const pendleTokenRedeemAction = new dfs.actions.pendle.PendleTokenRedeemAction(
    market,
    underlyingToken,
    ptToken,
    from,
    to,
    ptAmount,
    minAmountOut
);

```

### Action Type

`STANDARD_ACTION`

### Input Parameters

```solidity
    /// @param market The address of the Pendle market
    /// @param underlyingToken The address of the underlying token
    /// @param from The address from where the PT tokens will be pulled
    /// @param to The address of the recipient to receive the underlying tokens
    /// @param ptAmount The amount of PT tokens to redeem
    /// @param minAmountOut The minimum amount of underlying tokens to receive
    struct Params {
        address market;
        address underlyingToken;
        address from;
        address to;
        uint256 ptAmount;
        uint256 minAmountOut;
    }
```

### Return Value

```solidity
return bytes32(underlyingAmount);
```

### Events and Logs

```solidity
emit ActionEvent("PendleTokenRedeem", logData);
logger.logActionDirectEvent("PendleTokenRedeem", 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/pendle/pendletokenreedem.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.
