Transactions are like the important moves in a game of trading cards. They help people send value to each other in a special way. Let's learn about the parts that make up these transactions and the rules they follow.
When people use cryptocurrency, they're swapping value with each other. Imagine it's like giving and getting things, but it's all done electronically. The main parts of these value swaps are:
Inputs are like stamps that show you own something. Outputs are the new things created after a swap. Extra info is like the details and time of the swap.
Cryptocurrency uses a smart system called UTXO. It keeps track of who owns what without needing a big list. Here's how it works:
Each owned thing is connected to a person's special address. To use what they own, people have to prove it's theirs with a secret code.
When people use what they own, it gets used up. If there's some left, it becomes something new they can use later. It's like breaking a big chocolate bar into smaller pieces to share.
For example: If someone wants to share 0.5 of their chocolate bar but only has 1, they can break it in half, giving 0.5 to a friend and keeping 0.5 for themselves.
Checking if something is owned is easy with UTXO. It just looks at the proof and sees if the thing was used before. It's like making sure a coupon is real before using it.
When people swap things in cryptocurrency, there are rules to keep it fair. Here's what they check:
Each swap must use something that really exists and hasn't been used before. It's like making sure a game card is in good shape before trading it.
People use secret codes to show a swap is real. The code is checked to make sure it's right. It's like checking a password to open a door.
The things given must be the same as the things received. It's like making sure what you buy with your pocket money is worth the same as what you gave.
Some swaps have extra rules. It's like following special instructions when trading game cards to make sure everyone plays fair.
When people want their swaps to happen faster, they can pay a little extra. This helps the people who make the swaps go faster. It's like giving a small tip to get faster service in a restaurant.
For example: In a game of trading cards, if you want to trade quickly, you might give a small extra card to the person who helps with the trade.
Transactions and the UTXO system are the basic building blocks of cryptocurrency. They help people trade things with each other in a smart and fair way. By understanding how these transactions work, people can use cryptocurrency to share and trade with trust and fairness.
This article takes inspiration from a lesson found in MAS.S62 at MIT.