Open
Conversation
Adds a general principle for choosing the currency field value, with rules for fiat-pegged stablecoins, non-fiat assets, yield-bearing tokens, and denominated-but-not-pegged tokens. Co-authored-by: Daniel Robinson <1187252+danrobinson@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d020d-868a-745e-ac3d-a5360bb9cbe8
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Daniel Robinson <1187252+danrobinson@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d020d-868a-745e-ac3d-a5360bb9cbe8
- ISO 4217 rule covers commodities too (XAU, XAG), not just fiat - Origin chain symbol as tiebreaker for ambiguous symbols - Fix stETH/wstETH examples (stETH tracks ETH, wstETH tracks itself) - Tokens with no reference asset use their own symbol - Add DEX context for edge cases (2% of 1:1 price) Co-authored-by: Daniel Robinson <1187252+danrobinson@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d020d-868a-745e-ac3d-a5360bb9cbe8
danrobinson
reviewed
Mar 18, 2026
| | USDT | `"USD"` | `"USDT"` | | ||
| | PYUSD | `"USD"` | `"PYUSD"` | | ||
| | EURC | `"EUR"` | `"EURC"` | | ||
| A TIP-20 token can declare a currency identifier that identifies the reference asset whose price the token is designed to track. This enables proper routing and pricing in Tempo's [Stablecoin DEX](/protocol/exchange). **Only `USD`-denominated stablecoins can be used to pay transaction fees on Tempo.** USD-denominated TIP-20 tokens also serve as quote tokens in the DEX. |
Contributor
There was a problem hiding this comment.
Suggested change
| A TIP-20 token can declare a currency identifier that identifies the reference asset whose price the token is designed to track. This enables proper routing and pricing in Tempo's [Stablecoin DEX](/protocol/exchange). **Only `USD`-denominated stablecoins can be used to pay transaction fees on Tempo.** USD-denominated TIP-20 tokens also serve as quote tokens in the DEX. | |
| A TIP-20 token can declare a currency identifier that identifies the reference asset whose price the token is designed to track. This enables proper routing and pricing in Tempo's [Stablecoin DEX](/protocol/exchange). Currently, **only `USD`-denominated stablecoins** can be used to pay transaction fees on Tempo or traded on the StablecoinDEX. |
danrobinson
reviewed
Mar 18, 2026
| #### Guidelines | ||
|
|
||
| 1. **Tokens that track an asset with an [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) code** — use that code. This includes fiat currencies (`"USD"`, `"EUR"`) as well as commodities (`"XAU"` for gold, `"XAG"` for silver). | ||
| 2. **Tokens tracking a non-ISO asset at 1:1** — use the symbol of the reference asset. For example, a bridged WBTC that tracks BTC should use `"BTC"`. Prefer `"BTC"` over `"XBT"`. Use the symbol from the asset's origin chain when there is ambiguity across platforms. |
Contributor
There was a problem hiding this comment.
Suggested change
| 2. **Tokens tracking a non-ISO asset at 1:1** — use the symbol of the reference asset. For example, a bridged WBTC that tracks BTC should use `"BTC"`. Prefer `"BTC"` over `"XBT"`. Use the symbol from the asset's origin chain when there is ambiguity across platforms. | |
| 2. **Tokens tracking a non-ISO asset at 1:1** — use the symbol of the reference asset. For example, a bridged WBTC that tracks BTC should use `"BTC"`; a bridged WETH that tracks ETH should use `"ETH"`. Prefer `"BTC"` over `"XBT"`. Use the symbol from the asset's origin chain when there is ambiguity across platforms. |
danrobinson
reviewed
Mar 18, 2026
| 1. **Tokens that track an asset with an [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) code** — use that code. This includes fiat currencies (`"USD"`, `"EUR"`) as well as commodities (`"XAU"` for gold, `"XAG"` for silver). | ||
| 2. **Tokens tracking a non-ISO asset at 1:1** — use the symbol of the reference asset. For example, a bridged WBTC that tracks BTC should use `"BTC"`. Prefer `"BTC"` over `"XBT"`. Use the symbol from the asset's origin chain when there is ambiguity across platforms. | ||
| 3. **Unique-price assets** — if the token tracks an asset that trades at its own distinct price, use that asset's specific symbol. For example, bridged wstETH should use `"wstETH"`, not `"ETH"`, because wstETH trades at its own price. But bridged stETH should use `"ETH"`, because 1 stETH is designed to be worth 1 ETH. | ||
| 4. **Tokens denominated in but not pegged to a currency** — do **not** use that currency's code. A tokenized gold product priced in USD should not use `"USD"`, because 1 unit is not designed to be worth 1 USD. |
Contributor
There was a problem hiding this comment.
Eh, I think can cut this, kind of confusing
danrobinson
reviewed
Mar 18, 2026
|
|
||
| #### Examples | ||
|
|
||
| | Token | Tracks | Correct `currency` | Incorrect `currency` | |
Contributor
There was a problem hiding this comment.
I think drop the "Incorrect currency" column
danrobinson
reviewed
Mar 18, 2026
src/pages/protocol/tip20/spec.mdx
Outdated
| /// @param name The token's ERC-20 name | ||
| /// @param symbol The token's ERC-20 symbol | ||
| /// @param currency The token's ISO 4217 currency code (e.g. "USD", "EUR"). Immutable after creation. | ||
| /// @param currency The token's currency identifier. Immutable after creation. See Currency Declaration. |
Contributor
There was a problem hiding this comment.
Should say "The token's currency identifier (ISO 4217 code, when available)."
"See Currency Declaration" needs to have the docs URL in parentheses.
- Reword intro to say 'currently' for USD-only fee/DEX support - Add WETH example to rule 2 - Remove unique-price assets rule (confusing), covered by general principle - Drop 'Incorrect currency' column from examples table - Fix factory @param to say 'ISO 4217 code, when available' with full URL Co-authored-by: Daniel Robinson <1187252+danrobinson@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d020d-868a-745e-ac3d-a5360bb9cbe8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands the Currency Declaration section in the TIP-20 overview with a general principle and clearer guidelines for choosing the
currencyfield value.Changes
currencyfield identifies the reference asset that 1 unit of the token is designed to be worthPrompted by: dan