Skip to content

Feature Proposal: ClaimableYield Extension #703

@tonton-sol

Description

@tonton-sol

Proposed Feature

Introduce a ClaimableYield extension to the SPL Token-2022 program that enables yield-bearing tokens where holders can claim accumulated yield as newly minted tokens. Unlike rebasing models that continuously adjust balances, this extension keeps balances stable until users explicitly claim their yield.

Key properties:

  • Automatic yield tracking during standard token operations
  • Manual claiming of accumulated yield into spendable balance
  • Global yield index updated by an authority, applied uniformly across accounts when claiming
  • Local indices per account to track individual accrual
  • Fully compatible with standard SPL Token instructions (transfer, mint, burn)

Full technical documentation is provided here as a GitHub gist.


Why Is This Needed

Current SPL Token yield approaches each come with shortcomings:

  • Exchange-Rate Based Tokens : Balances stay fixed; yield accrues via an increasing exchange rate (from staking rewards or borrower interest). Composable and common, but yield is implicit (not visible in balances) and requires reading the exchange rate.
  • Token-2022 Scaled UI / Interest Extensions: On-chain mint extension applies a multiplier to displayed balances; raw amounts and supply don’t change. Mechanically sound and composable, but cosmetic only — no new tokens are minted, and in non-extension-aware contexts the “yield” is invisible.
  • Internal Accounting / Claimable Rewards: Protocols track deposits and credit pending yield internally, which users later claim. This works but yield is siloed inside the protocol and not composable outside of it.

The ClaimableYield extension solves these problems by combining the strengths of both approaches without their weaknesses. Balances remain predictable for programs (like exchange-rate tokens), but yield is real — minted when claimed, not just cosmetic. Users explicitly control when to realize it, ensuring transparency and portability across all SPL-aware contexts.


Proposed Solution

The solution introduces two extensions:

  • ClaimableYieldConfig (mint extension)
  • ClaimableYieldAccount (account extension)

And four new instructions:

  • InitializeMint: Set up ClaimableYield on a mint with authority and initial index.
  • UpdateIndex: Authority-controlled index update for distributing yield (monotonic only).
  • ConfigureAccount: Opt-in extension for accounts to track yield accrual.
  • ClaimYield: Hard claim accumulated yield, minting new tokens into spendable balance.

Integration with Standard Instructions

These instructions integrate with SPL Token operations:

  • Transfer/Mint/Burn trigger soft claims to update pending yield and indices.
  • ClaimYield converts pending + accrued yield into spendable tokens.

Math & Safety

  • 9-decimal fixed-point arithmetic for precision.
  • u128 intermediates used to prevent overflow.
  • Truncation always rounds down to protect protocol integrity.
  • Global index is monotonic to prevent negative yield or manipulation.

Other Considerations

  • Authority model: Index authority can only increase the yield index; it cannot decrease it or access user funds.
  • Composability: Fully compatible with transfer fees; yield accrues before fee deductions.
  • Precision: Minimum thresholds are documented so small accounts understand truncation limits.
  • Security: Overflow checks, atomic updates, and immutable local index progression.
  • Compatibility: Not yet compatible with ConfidentialTransfer or ConfidentialMintBurn (will be added).

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions