Home
Communities
Airdrops
Leaderboard
Meme Coins
AboutFAQ
Do you know this? | Avalanche uses the both Account and UTXO model but the most important is that the main x-chain settlement chain is UTXO based same as Bitcoin.
5
0.00
6 Comments
6 Discussions

*used to be


In the Cortina update v1.10 the X-Chain underwent linearization and migrated from UTXO to Snowman++ consensus which is a totally ordered state.


However - the design of subnets can, of course, handle any VM and subnets are still not bound to be Account Model based should the deployer of a subnet want to use a different model.

2
Reply
Write your reply...
@Xbitcode
Replied to comment 1 year ago

You are mixing the consensus to the blockchain architecture. It is still UTXO based Blockchain and it is huge reason why this is the case. to understand this you will need to have good understanding in Bitcoin. You can check here https://subnets.avax.network/p-chain/address/avax18z563jzeqgtj7xr9w3yulcdrj0tckuj778j3tm UTXOs (Unspent TX Output)

3
Reply
Write your reply...
@Viperxl007
Replied to comment 1 year ago

Well - mistaken I was. This just sent me down quite the rabbit hole and a lot of things are much more clear now as UTXO/EUTXO have been things I've been roughly aware of but not fully grasped. I am not all the way there yet but I definitely have a much better understanding now. Thanks!

2
Reply
Write your reply...
Hide replies
Hide replies

can someone explain the key features of both designs, as well as the advantages / shortfalls of them?

2
Reply
Write your reply...
@Viperxl007
Replied to comment 1 year ago

So there's a lot to it but just taking a stab at the highest order of difference - the account model is based on a lot of global states that have to be agreed upon as the most trusted state. So like - how many tokens does your account have vs my account and does that agree with what the smart contract issuing the tokens says we each have, etc.

In the UTXO everything is much more simple (and therefore, secure as well). So in the UTXO say you own 100 tokens of $TOKENA and you want to send 10 of them to me. The 100 tokens you own are currently sitting in an "unspent transaction" (a UTXO) in the entire global data set/pool of unspent transactions. Think of it like a little bubble of canister of 100 tokens. The fact that it exists in the pool of all unspent transactions means that it is valid to be spent.

So you want to send me 10 of those tokens - so you call on your little canister of 100 tokens in the pool and you create a transaction (obviously proving you own that canister and it's contents) and you say send 10 to Viper's wallet. What the UTXO model will do is it will take your 100 token canister and it will pull it out of the pool, go grab two brand new canisters off the wall and put 10 tokens in one canister and slap a new ownership label on it and assign it to me, and it will put the other 90 tokens in the other brand new canister and assign it's ownership to you and it will toss both canisters back into the global pool of unspent transactions. This removed/burnt your original canister that held 100 tokens and that canister can never be used again.

So - now extrapolate that just a little bit and you should be able to see how efficient and parallelized that process is because every single transaction is removing canisters from the pool to be processed - so if someone tried to "double spend" a particular canister they fundamentally could not do it because the canister is busy being used - it literally doesn't exist in the pool to be tampered with.

Meanwhile - in the account model there's a centralized contract somewhere for $TOKENA and it's keeping track of what wallet addresses are credited with how many of the total supply of tokens and when you want to send me 10 tokens - your transaction calls out to the contract and says "Can they send 10 tokens?" and the contract confirms or denies it and then the contract updates it's global state to tell everyone that you're debited 10 tokens and my account is credited 10 tokens and every step of that process incurs an ever so slight delay when the messages are in-flight that leave a tiny window of opportunity for someone to try to do something malicious. Making the account model more vulnerable to exploit because of how it functions. BUT the account model also enables a lot more flexibility which enables more functionality (but everything at a cost).

Personally - I detest the account model in all it's forms (basically any EVM-based chain). Big fan of the UTXO model and all of it's derivations :-)

2
Reply
Write your reply...
@Singlemaltwizzy
Replied to comment 1 year ago

Loving that community already - great content and answers/discussions in here. Thanks all for the input!!

2
Reply
Write your reply...
Hide replies
Hide replies