You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Burn certificate with mandatory fields: burn_reason and nonce
We need two new persistent fields for coins and coin split:
coins: {coin_id: value} // [optional] coin-value mapping
reason // genesis reason. Arbitrary data type, same as in state data field
SDK:
two new params for mint:
coins [optional] coin-value mapping
reason // genesis reason
coin_split (new method):
Input: original token, {token_id: {coin_id: value}} //token ids mapping to coin-to-value mappings (coins split distribution among new token ids)
Output: {hashroot, token_id: merkle_path} // Hashroot of the sum-certified merkle tree; token ids mapping to the respective merkle paths from the sum-certified tree distributing coin values among new token ids
Flow:
create coin distribution verifiable structure with coin_split for the new token ids: {hashroot, token_id: merkle_path}
calculate address for the predicate burn(hashroot, nonce)
create transaction of the token into the burn address
submit the commitment of the transaction and aquire the unicity proof
import token with the transaction with the burn-state
for all the new token ids: mint a new token with an id from the coin-split distribution and (1) indicate in the mint reason: the original burned token and the merkle path to the respective leaf representing the new token id; (2) the respective coin-value mapping corresponding to the token-split distribution for the given new token id.
Token structure verification:
standard token transition history since the genesis till the latest state: unlock current state predicate with the respective arguments, spend into the address referring the next locking predicate, etc.
coin-value mapping corresponds to the previous burned token and the merkle path of the sum tree from previous coin split (if present)
Note: coins can be split multiple times, thus the genesis reason field might contain nested structure of previous tokens which have undergo coin splits
For reference (subject of change, may contain inconsistencies, use as a hint, no need to follow word-by-word):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Token split implementation:
Burn certificate with mandatory fields: burn_reason and nonce
We need two new persistent fields for coins and coin split:
coins: {coin_id: value} // [optional] coin-value mapping
reason // genesis reason. Arbitrary data type, same as in state data field
SDK:
two new params for mint:
coins [optional] coin-value mapping
reason // genesis reason
coin_split (new method):
Input: original token, {token_id: {coin_id: value}} //token ids mapping to coin-to-value mappings (coins split distribution among new token ids)
Output: {hashroot, token_id: merkle_path} // Hashroot of the sum-certified merkle tree; token ids mapping to the respective merkle paths from the sum-certified tree distributing coin values among new token ids
Flow:
create coin distribution verifiable structure with coin_split for the new token ids: {hashroot, token_id: merkle_path}
calculate address for the predicate burn(hashroot, nonce)
create transaction of the token into the burn address
submit the commitment of the transaction and aquire the unicity proof
import token with the transaction with the burn-state
for all the new token ids: mint a new token with an id from the coin-split distribution and (1) indicate in the mint reason: the original burned token and the merkle path to the respective leaf representing the new token id; (2) the respective coin-value mapping corresponding to the token-split distribution for the given new token id.
Token structure verification:
standard token transition history since the genesis till the latest state: unlock current state predicate with the respective arguments, spend into the address referring the next locking predicate, etc.
coin-value mapping corresponds to the previous burned token and the merkle path of the sum tree from previous coin split (if present)
Note: coins can be split multiple times, thus the genesis reason field might contain nested structure of previous tokens which have undergo coin splits
For reference (subject of change, may contain inconsistencies, use as a hint, no need to follow word-by-word):
https://docs.google.com/document/d/15Iv1rMbVuJOjrhGjWvKx3Zg6iPIAdPrkvczU6L5y7Zg/edit?usp=sharing,
https://docs.google.com/document/d/1Rwlzws6NK1t1f3wMPNPX5RPuWVvKaAa2ubm-5NhObtM/edit?usp=sharing
https://docs.google.com/document/d/1QvAbLbk4rl1YLMJO21iZl2KCOvmaEKnjSPvv_bSpIuA/edit?usp=sharing
https://docs.google.com/document/d/177EK98kn0qdzDwGAhg6Z5ctFbdQ6adTrdDAZ_97JhDs/edit?usp=sharing
Beta Was this translation helpful? Give feedback.
All reactions