SnowconeDAO
ResourcesMediaDocs
  • Introduction
  • Create
    • Make Your Snowcone Project
      • Project Details
      • Funding
      • Token
      • Rules
    • Governance Resources
      • Snapshot
      • Gnosis Safe
    • Community Resources
      • Make a Discord Server
  • Learn
    • Overview
    • Architecture
    • Administration
    • Risk
    • Glossary
      • Ballot
      • Data Source
      • Delegate
      • Discount Rate
      • Funding cycle
      • NFT rewards
      • Operator
      • Overflow
      • Payment terminal
      • Project
      • Redemption rate
      • Reserved tokens
      • Split allocator
      • Splits
      • Tokens
    • Tokenomics
  • Build
    • Getting Started
    • Basics
    • Project NFT
    • Programmable treasury
    • Treasury extensions
      • Ballot
      • Data Source
      • Pay delegate
      • Redemption Delegate
      • Split Allocator
    • Utilities
      • Project payer
      • Splits Payer
  • API
    • Data Structures
      • SNOW721PricingParams
      • SNOW721Tier
      • SNOW721TierParams
      • SNOWBitmapWord
      • SNOWDeployTiered721DelegateData
      • SNOWDidPayData
    • Contracts
      • SNWProjects
        • Event
          • Create
          • SetMetadata
          • SetTokenUriResolver
        • Properties
          • Count
          • metadataContentOf
          • tokenUriResolver
        • Read
          • supportsInterface
          • tokenURI
        • Write
          • createFor
          • setMetadataOf
          • setTokenUriResolver
  • Subgraph
    • Subgraph Entities
    • Sample Queries
Powered by GitBook

SnowconeDAO

On this page

Was this helpful?

Export as PDF
  1. Build
  2. Treasury extensions

Redemption Delegate

Specifications

A contract can become a treasury redemption delegate by adhering to ISnowconeRedemptionDelegate3_1_1:

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:

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.

Last updated 1 year ago

Was this helpful?