Grin 101 – What is Grin and How it Works
One of the biggest challenges for the adoption of bitcoin as a global currency is scalability. There have been several attempts at solving this, among others:
- The implementation of SegWit (malleability fix but allows for scaling through layer 2 solutions like Lightning Network)
- Changing block sizes (like the BCH fork)
- New currencies that use different protocols including the one of interest today called Grin
So, what is Grin, how does it work and why is it interesting?
What is Grin?
Grin is a community-supported implementation of the MimbleWimble protocol. The MimbleWimble protocol seeks to accomplish 3 main things:
- Ensure privacy by using zero-knowledge proofs
- Keeping a small blockchain by registering less information on the blocks
- Have fast transaction verification processes
Grin seeks to accomplish scalability and privacy by having no addresses and no amounts stored on the blockchain.
How does it work?
MimbleWimble relies on Confidential Transactions and CoinJoin to keep information about the transaction private. Confidential transactions use blinding factors to hide the amounts in a transaction, and nodes only need to verify that no new money is being created. An example of how blinding factors work in cryptography can be conceptualized through the following sample equations:
1 + 2 = 3, or 1 + 2 – 3 = 0
Adding a blinding factor would look something like multiplying every value by 5:
1×5 + 2×5 = 3×5, or 1×5 + 2×5 – 3×5 = 0
Secretly multiplying every original value by 5 does not change the fact that the equation is balanced (nodes verifying the process will see 5 + 10 = 15 and confirm no new money was created) but will obscure the original values. This zero-knowledge proof works when both parties involved in the transaction communicating directly:
- Both parties agree on the amount to be transferred
- Sender chooses inputs which will add up to the amount that was agreed upon. Sender then choses blinding factors for the transaction and adds them together before sending to receiver
- Adding together all the blinding factors for every input in the transaction proves you own them
- Receiver picks the blinding factors for the output of the transaction and adds them together and sends back to sender
- Knowing the blinding factor for a given output allows you to spend it
Why Does Grin, Which is Based on MimbleWimble, Matter?
Grin claims to follow the original spirit of Bitcoin by being a community-supported project and remaining decentralized and somewhat ASIC mining resistant. It is a one of a kind coin; its closest competitor is BEAM, another implementation of the MimbleWimble protocol but under a more centralized approach. Right now, Grin can be mined in PCs, and it has the potential to be a truly private, decentralized, and scalable coin.