-
Notifications
You must be signed in to change notification settings - Fork 29
docs: ADR-002 The Photon Token #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
110a582
eb86f52
3233bfd
a90e3fe
4f87430
df04d5c
623d23d
54809e7
700f36b
08200a8
1f0fb7a
cccabf1
a25825f
322eb48
8052d06
c566625
97b091a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,221 @@ | ||||||
| # ADR 002: The Photon token | ||||||
|
|
||||||
| ## Changelog | ||||||
|
|
||||||
| - 15 October 2024: Initial version | ||||||
|
|
||||||
| ## Status | ||||||
|
|
||||||
| DRAFT | ||||||
|
|
||||||
| ## Abstract | ||||||
|
|
||||||
| This ADR proposes to introduce the PHOTON token (ticker `photon`) as the only | ||||||
| fee token of AtomOne. The only way to get PHOTONs is to burn ATONEs. | ||||||
|
|
||||||
| ## Context | ||||||
|
|
||||||
| The PHOTON token is specified in the [AtomOne Constitution Article 3 Section 5]: | ||||||
|
|
||||||
| > ### Section 5: The PHOTON Token | ||||||
| > | ||||||
| > The PHOTON shall be the only fee token except for ATONE to PHOTON burn | ||||||
| > transactions. This applies for all transactions on the root and core shards, | ||||||
| > and all IBC and ICS payments. | ||||||
| > | ||||||
| > ATONE tokens may be burned to PHOTON tokens at a conversion rate set by law | ||||||
| > such that the total amount of PHOTONs mintable through burning ATONE tokens | ||||||
| > shall be capped at 1B PHOTON tokens. | ||||||
| > | ||||||
| > PHOTONs cannot be converted back into ATONE tokens. | ||||||
|
|
||||||
| ## Decision | ||||||
|
|
||||||
| The ADR proposes to create a new `photon` module to host the following | ||||||
| features: | ||||||
| - New `ConversionRate` query | ||||||
| - New `MsgBurn` message (XXX or `MsgMint`? or `MsgConvert` ? or something else?). | ||||||
tbruyelle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| - New [`TxFeeChecker`] implementation to enforce the PHOTON token as the only | ||||||
| fee token. | ||||||
|
|
||||||
| ### `ConversionRate` query | ||||||
|
|
||||||
| The `ConversionRate` query returns a decimal which represents the current | ||||||
tbruyelle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| conversion rate of ATONE to PHOTON. This conversion rate is computed as the | ||||||
| following: | ||||||
|
|
||||||
| ```math | ||||||
| conversion\_rate = \dfrac{photon_{max\_supply} - photon_{supply}}{atone_{supply}} | ||||||
| ``` | ||||||
| where | ||||||
| ```math | ||||||
| photon_{max\_supply} = 1,000,000,000 | ||||||
tbruyelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| ``` | ||||||
|
|
||||||
| Given this formula, when the PHOTON supply reaches the max supply of 1 billion, | ||||||
| it is no longer possible to get PHOTONs, because the conversion rate will return | ||||||
| the 0 value. | ||||||
tbruyelle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| ### `MsgBurn` message | ||||||
|
|
||||||
| `MsgBurn` takes an amount of ATONEs and returns an amount of PHOTONs. | ||||||
|
||||||
| The amount of ATONEs is burnt while the amount of PHOTONs is minted and moved | ||||||
|
||||||
| The amount of ATONEs is burnt while the amount of PHOTONs is minted and moved | |
| The amount of ATONEs is burnt while the amount of PHOTONs is minted and sent |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| onto the message signer account. The number of minted PHOTONs is equal to the | |
| to the account that signed the message. The number of minted PHOTONs is equal to the |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's again an unlikely scenario, due to the fact that all atones should be converted to the the max amount of photons. It will never reach a cap unless the chain has no stake anymore
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely. It's not a parameter. Changing this if and when should be done very carefully or it would be disastrous.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would even go as far as preventing the node from starting if it's a validator and minimum-gas-prices aren't set with the two denoms. It could be code that runs at app initialization in app.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Create a clear distinction between money (PHOTON) and security (ATONE). ATONE | |
| - Provide segregation of functionalities to allow the staking token to function as such unperturbed. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ATONE is meant to be a pure staking token and allow to freely inflate between the 7% and 20% bounds,
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| only fee token reinforces this property. | |
| targeting the 2/3 bonding ratio. PHOTON as the fee token reinforces this property. |
tbruyelle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
tbruyelle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
tbruyelle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
tbruyelle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
tbruyelle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,58 @@ | ||
| <!-- | ||
| order: false | ||
| --> | ||
| # ADR {ADR-NUMBER}: {TITLE} | ||
| ## Changelog | ||
| - {date}: {changelog} | ||
| ## Status | ||
| {DRAFT | PROPOSED} Not Implemented | ||
| > Please have a look at the [PROCESS](./PROCESS.md#adr-status) page. | ||
| > Use DRAFT if the ADR is in a draft stage (draft PR) or PROPOSED if it's in review. | ||
| ## Abstract | ||
| > "If you can't explain it simply, you don't understand it well enough." Provide | ||
| > a simplified and layman-accessible explanation of the ADR. | ||
| > A short (~200 word) description of the issue being addressed. | ||
| ## Context | ||
| > This section contains all the context one needs to understand the current state, and why there is a problem. | ||
| > It should be as succinct as possible and introduce the high level idea behind the solution. | ||
| > The language in this section is value-neutral. It is simply describing facts. | ||
| ## Decision | ||
| > This section explains all of the details of the proposed solution, including implementation details. | ||
| It should also describe affects / corollary items that may need to be changed as a part of this. | ||
| If the proposed change will be large, please also indicate a way to do the change to maximize ease of review. | ||
| (e.g. the optimal split of things to do between separate PR's) | ||
| ## Consequences | ||
| > This section describes the consequences, after applying the decision. | ||
| > All consequences should be summarized here, not just the "positive" ones. | ||
| ### Positive | ||
| > {positive consequences} | ||
| ### Negative | ||
| > {negative consequences} | ||
| ### Neutral | ||
| > {neutral consequences} | ||
| ## References | ||
| > Are there any relevant PR comments, issues that led up to this, or articles referrenced for why we made the given design choice? If so link them here! | ||
| * {reference link} | ||
| <!-- | ||
| order: false | ||
| --> | ||
|
|
||
| # ADR {ADR-NUMBER}: {TITLE} | ||
|
|
||
| ## Changelog | ||
|
|
||
| - {date}: {changelog} | ||
|
|
||
| ## Status | ||
|
|
||
| {DRAFT | PROPOSED} Not Implemented | ||
|
|
||
| > Please have a look at the [PROCESS](./PROCESS.md#adr-status) page. | ||
| > Use DRAFT if the ADR is in a draft stage (draft PR) or PROPOSED if it's in review. | ||
|
|
||
| ## Abstract | ||
|
|
||
| > "If you can't explain it simply, you don't understand it well enough." Provide | ||
| > a simplified and layman-accessible explanation of the ADR. | ||
| > A short (~200 word) description of the issue being addressed. | ||
|
|
||
| ## Context | ||
|
|
||
| > This section contains all the context one needs to understand the current state, and why there is a problem. | ||
| > It should be as succinct as possible and introduce the high level idea behind the solution. | ||
| > The language in this section is value-neutral. It is simply describing facts. | ||
|
|
||
| ## Decision | ||
|
|
||
| > This section explains all of the details of the proposed solution, including implementation details. | ||
| It should also describe affects / corollary items that may need to be changed as a part of this. | ||
| If the proposed change will be large, please also indicate a way to do the change to maximize ease of review. | ||
| (e.g. the optimal split of things to do between separate PR's) | ||
|
|
||
| ## Consequences | ||
|
|
||
| > This section describes the consequences, after applying the decision. | ||
| > All consequences should be summarized here, not just the "positive" ones. | ||
|
|
||
| ### Positive | ||
|
|
||
| > {positive consequences} | ||
|
|
||
| ### Negative | ||
|
|
||
| > {negative consequences} | ||
|
|
||
| ### Neutral | ||
|
|
||
| > {neutral consequences} | ||
|
|
||
| ## References | ||
|
|
||
| > Are there any relevant PR comments, issues that led up to this, or articles referrenced for why we made the given design choice? If so link them here! | ||
|
|
||
| * {reference link} |
Uh oh!
There was an error while loading. Please reload this page.