# CBRedeem

### Description

Action redeems bLUSD tokens for LUSD tokens, from the chickend bond manager contract. The user gets back LUSD tokens based on the redemption rate of the contract. Yearn yTokens can also be returned back to the user in case of the vault is deprecated and makes it redeemable.

Action calls [`ChickenBondManager.redeem(uint256 _bLUSDToRedeem, uint256 _minLUSDFromBAMMSPVault);`](https://github.com/liquity/ChickenBond/blob/3e20aa2672ed4cc15e47a2b154f1c5a9f3597908/LUSDChickenBonds/src/ChickenBondManager.sol#L450)

### Action ID

`0x0ec91495`

### SDK Action

```ts
const cBRedeemAction = new dfs.actions.chickenBonds.CBRedeemAction(
    bLUSDAmount,
    minLUSDFromSP,
    from,
    to
);
```

### Action Type

`STANDARD_ACTION`

### Input Parameters

```solidity
    /// @param bLUSDAmount Amount of bLusd tokens to pull
    /// @param minLUSDFromSP Min. amount of LUSD to receive
    /// @param from Address from where to pull bLusd tokens
    /// @param to Address where to send LUSD tokens (possibly yTokens as well)
    struct Params {
        uint256 bLUSDAmount;
        uint256 minLUSDFromSP;
        address from;
        address to;
    }
```

### Return Value

```solidity
return bytes32(lusdAmount);
```

### Events and Logs

```solidity
emit ActionEvent("CBRedeem", logData);
logger.logActionDirectEvent("CBRedeem", 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/chicken-bonds/cbredeem.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.
