dfinity / ICRC

Repository to ICRC proposals
Apache License 2.0
29 stars 5 forks source link

ICRC-19: Rebase Token Standard #19

Open 0kenx opened 1 year ago

0kenx commented 1 year ago

ICRC-19 - Rebase Token Standard Data Details icrc: 19 title: ICRC-19 Rebase Token Standard author: @0kenx status: Deliberating category: ICRC requires: ICRC-1 created: 2023-03-23 updated: 2023-03-23

Context

The ICRC-1 fungible token standard has become widely adopted, offering an efficient way to transfer and manage tokens on a blockchain. However, it lacks the ability to handle elastic supply tokens, which adjust their circulating supply through mechanisms such as rebasing. Rebasing tokens have become increasingly popular as a means to create stablecoins or facilitate novel economic models. This proposal aims to extend the ICRC-1 standard to support rebase tokens, creating the ICRC-19 Rebase Token Standard.

Assumptions

The ICRC-1 standard has been implemented and widely adopted. There is a growing interest in rebase tokens and elastic supply mechanisms within the blockchain community. Implementing an extended token standard will promote a consistent approach to handling rebase tokens, improving interoperability and user experience.

Goals and Objectives

Extend the ICRC-1 standard to support rebase tokens by defining a set of functions and events specific to rebasing. Ensure that the ICRC-19 Rebase Token Standard is backward compatible with ICRC-1, enabling existing applications to easily integrate rebase tokens. Facilitate the development of rebase tokens, which can be used for various use cases, including stablecoins, incentive tokens, and novel economic models.

Use Cases

Stablecoins: Rebasing mechanisms can be used to create stablecoins that maintain a constant value relative to a reference asset, such as a fiat currency or a commodity. By adjusting the circulating supply, the rebase token can maintain a stable price, providing a less volatile alternative to traditional cryptocurrencies.

Incentive Tokens: Rebase tokens can be employed in decentralized finance (DeFi) applications as incentive tokens, adjusting their supply to incentivize user participation or achieve specific objectives, such as maintaining a target collateralization ratio.

Novel Economic Models: Rebase tokens can be used to create innovative economic models, such as bonding curves, which allow projects to manage their own token liquidity and price dynamics.

Methods

A rebase token consists of a base balance (or the base amount) that never changes, and a nominal balance that might change accoding to a rebase multipler. The ICRC-1 methods expose only the nominal balance. When interacted with using ICRC-1 methods, the base balance is calculated from the nominal balance and the rebase multiplier.

We propose to add the following new methods *_base in order for applications to interact directly with the base amount: icrc19_total_supply_base : () -> (nat) query; icrc19_balance_of_base : (Account) -> (nat) query; icrc19_transfer_base : (TransferArgs) -> (variant { Ok: nat; Err: TransferError; });

icrc1_supported_standards shall return an extra entry record { name = "ICRC-19"; url = "https://github.com/dfinity/ICRC/ICRCs/ICRC-19" }

Conclusion

The ICRC-19 Rebase Token Standard extends the ICRC-1 fungible token standard, introducing support for rebase tokens and elastic supply mechanisms. This proposal aims to create a unified approach to handling rebase tokens, improving interoperability and user experience within the blockchain ecosystem. By adopting this standard, developers can create novel applications and services that leverage the unique properties of rebase tokens, ultimately enriching the overall ecosystem.