> For the complete documentation index, see [llms.txt](https://snowconedao.gitbook.io/snowconedao/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://snowconedao.gitbook.io/snowconedao/build/treasury-extensions/redemption-delegate.md).

# Redemption Delegate

**Specifications**

A contract can become a treasury redemption delegate by adhering to ISnowconeRedemptionDelegate3\_1\_1:

```javascript
interface ISnowconeRedemptionDelegate3_1_1 is IERC165 {
  function didRedeem(SnowconeDidRedeemData3_1_1 calldata data) external payable;
}

```

When extending the redemption functionality with a delegate, the protocol will pass a SnowconeDidRedeemData3\_1\_1 to the `didRedeem(...)` function:

```javascript
struct SnowconeDidRedeemData3_1_1 {
    address holder;
    uint256 projectId;
    uint256 currentFundingCycleConfiguration;
    uint256 projectTokenCount;
    SnowconeTokenAmount reclaimedAmount;
    SnowconeTokenAmount forwardedAmount;
    address payable beneficiary;
    string memo;
    bytes dataSourceMetadata;
    bytes redeemerMetadata;
}

struct SnowconeTokenAmount {
  address token;
  uint256 value;
  uint256 decimals;
  uint256 currency;
}

```

The `msg.sender` to the delegate will be the payment terminal that facilitated the redemption.

In payment terminals based on the SnowconePayoutRedemptionPaymentTerminal3\_1\_1, such as SnowconeETHPaymentTerminal3\_1\_1's and SnowconeERC20PaymentTerminal3\_1\_1's, the redemption delegate hook gets called before the reclaimed amount is sent to the redemption beneficiary, but after all internal accounting has been updated. View the docs.

Ensure to only allow trusted contracts to access the `didRedeem(...)` transaction.

**Attaching**

New delegate contracts should be deployed independently. Once deployed, its address can be returned from a data source hook.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://snowconedao.gitbook.io/snowconedao/build/treasury-extensions/redemption-delegate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
