Consider refactoring storage layout for asset amounts
- Linguagem predominante
- Rust
- Estrelas
- 132
- Forks
- 167
- Merge médio
- 1d 23h
- PRs com merge (30d)
- 110
Descrição
As of right now, we store asset amounts in a single Felt. That means that the highest token balance value is 2^64, which roughly equals 1.19e19.
Unfortunately, this makes it impossible for us to support tokens with 18 decimals, which is the standard across the crypto ecosystem.
I think we should consider adding an additional Felt for storing asset balances, which would give us a number with 128-bit precision, which should be enough for storing asset balances with 18 decimals adequately.
Once Miden is launched, we will want to support bridges and bringing tokens from other chains onto Miden. This change would make it easier for people trying to build upon us (DeFi interoperability).
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.