ORC20's UTXO Model
The innovative design of the ORC20 is the ability to reuse all output, which avoids excessive dependence on centralized indexes and makes the entire transaction chain easier to trace. This is beneficial for future expansion and optimization.
As the graph shows above, Alice minted four times and obtained four inscriptions in her wallet. In this case, let's assume each inscription is worth 1,000 tokens. Therefore, at this point, the balance associated with Alice's wallet address was 4,000 tokens. (See tx1, tx2, tx3, tx4)
Alice then wanted to give Bob 1,000 tokens. Alice first selected an unspent inscription of 1,000, then transferred the chosen minted inscription to Bob's wallet address. The balance associated with Bob's wallet address then became 1,000 tokens. (See tx5)
Alice also transferred 1,000 tokens to Carol's wallet address as she did to Bob's. After Alice completed the transfer, Carol's wallet address would have a balance of 1,000 tokens. (See tx6)
After these two transfers, Alice's balance was down to 2,000 tokens. Afterward, Alice wanted to split an inscription worth 200 tokens from her balance.
- In this case, Alice first needs to inscribe an inscription worth 200 tokens using "send inscription" . Secondly, she must sign the remaining balance into another inscription using "send remaining balance" .
- After Alice completed both steps, though the balance associated with Alice's wallet address would still be 2,000 tokens, the two original minted inscriptions would be considered as spent, and regenerated into two new unspent transaction output (UTXO) inscriptions, which were 200 and 1,800 tokens, respectively. (See tx7, tx8)
After that, Alice wanted to give Carol another 2,000 tokens. Alice could transfer these two inscriptions she currently has (one was 200 and the other one was 1,800) to Carol's wallet address separately. At this point, Carol would have three inscriptions which were 1,000 (mint), 200 (send), and 1,800 (send remaining balance) tokens, respectively, and the total balance associated with Carol's wallet address would become 3,000 tokens. (See tx9, tx10)
Lastly, Carol wanted to split out 500 tokens from her balance of 3,000. The first step would be inscribing a send inscription worth 500 tokens and the second step would be inscribing all the remaining balance into one inscription. After these steps, the balance associated with Carol's wallet address would still be 3,000 tokens, but becoming two new unspent balance inscriptions, which were worth 500 and 2,500 tokens, respectively. (See tx11, tx12)