Skip to content
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

Terminology around token/denomination/ticker/symbol/decimals #1556

Open
lukaw3d opened this issue Sep 26, 2024 · 2 comments
Open

Terminology around token/denomination/ticker/symbol/decimals #1556

lukaw3d opened this issue Sep 26, 2024 · 2 comments

Comments

@lukaw3d
Copy link
Member

lukaw3d commented Sep 26, 2024

No description provided.

@lukaw3d
Copy link
Member Author

lukaw3d commented Sep 26, 2024

From slack:

  • what are the correct terms for groups of these tokens: EUROe, TEST, ERC-20 EUROe (0x8A4826071983655805bF4f29828577Cd6b1aC0cB)?
  • is EUROe: fees token?
  • is TEST: consensus token?
  • are [EUROe, TEST]: native tokens? native denominations? paratime tokens? paratime balances?
  • is there a term non-fee tokens [TEST, [...]]?
  • are [EUROe, ERC-20 EUROe]: both ERC-20 tokens? (i.e. is EUROe also ERC-20 internally?)

Jernej:

  • EUROe and TEST are both exactly the same, they are sdk denominations; each of those can either be or not be a fee token. non-sdk denominations cannot be fee tokens.
  • EUROe is also the native token inside the EVM (because EVM only supports a single native token). any sdk denomination can be a native token, but once set, it is not possible to change it without possibly breaking all smart contracts.
  • ERC-20 EUROe I assume is just a deployed ERC-20 contract with the given name, nothing special.
  • in the future it will be possible to map any sdk denomination to an ERC-20 as well (to special fixed addresses), but this is currently not the case.

@lukaw3d
Copy link
Member Author

lukaw3d commented Sep 26, 2024

some code:

export const Ticker = {
ROSE: 'ROSE',
TEST: 'TEST',
EUROe: 'EUROe',
} as const
export type NativeTokenInfo = {
ticker: Ticker
free?: boolean
geckoId?: string
}

explorer/src/config.ts

Lines 22 to 27 in b45547a

/**
* What are the tokens on this layer?
* Note: native token must be the first on the list. Others are just incorrectly named "Native"
* See terminology in https://github.com/oasisprotocol/oasis-sdk/blob/5bec25f/client-sdk/go/config/default.go#L109-L120
*/
tokens: [NativeTokenInfo, ...NativeTokenInfo[]]

const mainToken = tokens[0]
const mainTicker = mainToken.ticker

const priceInfo = tokenPrices[balance.token_symbol as Ticker]

balances.some(balance => balance.token_decimals)

it('should render value with ROSE ticker symbol', () => {

token_symbol: oasis.misc.toStringUTF8(denomination) || getTokensForScope(scope)[0].ticker,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant