Spartan Labs Profile picture
Oct 5, 2022 25 tweets 13 min read Read on X
How Can #Soulbound Tokens AND #ZeroKnowledge Tech Be Integrated?

In the final instalment of this 3-part series, we present our implementation of private Soul Bound Tokens (SBT) using #zkSNARK tech👇

For the devs, the #Solidity code included below! Image
1/ Check out the full article below:
medium.com/@spartanlabs/t…
2/ In part 1 of the series, we went through the WHAT and WHY of SBTs and the design guidelines around them 👇

3/ In part 2 of the series, we went through the different implementations of Soul Bound Tokens to ensure that data stored within them would remain private, following design principles 🔓

4/ To ensure that users are not doxxed, privacy is a cornerstone of SBT implementation.

Storing sensitive data off-chain would keep data hidden. However, this would also expose the data to a new set of vulnerabilities and attack vectors!

Enter #Zero-Knowledge Technology.
5/ The use of Zero-Knowledge (ZK) technology is key in reducing the sharing of secrets to keep users' SBT data truly private.

ZK tech has been commonly used in L2 Rollups like @0xPolygonHermez, @Scroll_ZKP, @StarkWareLtd and @zksync @zksync which are key players in this space.
6/ What ZK tech does is that it allows one party to prove to another that a statement is true, without revealing any information beyond the validity of the statement itself.

Basically, prove that you know what the information is, without revealing the information itself.
7/ This might sound a little confusing, but let us demonstrate with the familiar puzzle game of Where's Waldo!

Suppose you are tasked to prove that you knew where Waldo was in an image, but without revealing where Waldo actually was.

How can you achieve that? Image
8/ A simple way would be to cut out Waldo from the scene but only show the verifier the cut-out Waldo snippet.

To ensure that this is the right Waldo, the verifier can watermark the back of Waldo’s page before the proof. Image
9/ Using this method, Waldo's coordinates relative to the rest of the scene is still unknown, and you have successfully proven you know where's Waldo without revealing where and how you found Waldo.
10/ So you might be thinking now, how can we use the concept of #ZK proofs with SBT?

In this context, the proof would show if a user's SBT data satisfies certain criteria instead of proving knowledge of Waldo's location.

And the secret lies within the SBT data itself.
11/ In order words, projects can validate the attributes of a Soul by using ZK proofs (e.g., that it has certain memberships).

They can also do so by allowing users to verify arbitrary assertions without giving any further information other than the statement itself.
12/ For example, #zkSNARK could allow someone to enter the club by proving that they are older than 18 years old without revealing their actual age!

In simple terms, this means that with ZK tech, any project can verify the attributes of a user without knowing the actual data.
13/ Why is this important?

For greater Web3 adoption in various use cases, storing of users’ KYC data on-chain is critical.

However, this has been challenging as on-chain data exposes users to doxxing and potential malicious attacks.
14/ How does #ZK tech solve this?

By masking the data whilst still making data publicly verifiable, ZK tech is able to prevent attacks and allow for interactions to be made on-chain securely.
15/ ZK tech will allow for a #Web3 future where we reap the benefits of traditional interdependent economic relations while maintaining anonymity.

We can encode social relationships in Web3 as in Web2, while maintaining privacy and reducing dependency on Web2 infrastructure.
16/ Using credit scores as an example, the Credit Bureau currently just reveals the exact credit score when it is requested.

With zkSBT, we are able to encode credit checking mechanisms on-chain but with better privacy.
17/ In this case, the specific credit score is concealed but any protocol will still be able to verify if users have a credit score which is above a particular threshold.
18/ How can we actually implement zkSBT?

We chose to use #zkSNARK as our ZK mechanism. This stands for Zero-Knowledge, Succinct, Non-interactive Argument of Knowledge.

In simple terms, this means that the proof can be independently verified without the prover's involvement.
19/ Using the user’s sensitive data, we can generate a proof that hides the user’s data but allows anyone to verify attributes of the data.

You can find more information in the tweet thread below 👀
20/ The full code for zkSBT is linked below 👇

The code shows how we can mask sensitive credit scores on-chain, but still allow other protocols to interact with the masked credit score to see if it meets a certain threshold.

github.com/SpartanLabsXyz…
21/ Huge thanks to @identhree for their SDK and @0xPARC for the starting template. Without these tools, creating #zkSNARK tools would take a lot more time.
22/ I know we said 3-part series…

But!

Next week, we are realising @vitalikbutherin's vision with our demo showcasing how we can easily create and implement zkSBTs to unlock the potential of a #decentralised society.

Stay tuned, I wouldn't miss this if I were you!
23/ Have a radical idea for a SoulBound Token use case? Feel free to share below!

Or if you are interested in integrating SBT into your project, we’d also love to hear from you!
24/ Interested to hear from you guys about your thoughts on our implementation of zkSBT!

@DefiIgnas
@vitalikbutherin
@iamjasonlevin
@glenweyl
@proofofhumanity
@getmasafi
@goldfinch_fi
@binance
@eddylazzarin

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Spartan Labs

Spartan Labs Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @TheSpartanLabs

Feb 10, 2023
With the markets roaring back to life after a wild 2022, retail interest is slowly seeping back into the space.

In 2021, NFTs were responsible for onboarding huge waves of retail into crypto.

In 2023, as retail interest returns, an emerging sector, #NFTFi, could benefit.
1/ If NFTs and DeFi had a child, it would be NFTFi

NFTFi is essentially the intersection of DeFi and NFTs, bringing functions that are traditionally rooted in finance to the NFT space.

Think: borrowing, lending, derivatives, all with your NFTs.
2/ With NFTFi, you can take a loan on your NFT exposing you to upside on both your coins and NFT.

Protocols such as @BendDAO, @the_x2y2, @JPEGd69 and many more have long provided such services.

In fact, there are currently 428 Bored Apes being lent out right now, on BendDAO!
Read 14 tweets
Nov 7, 2022
The Interchain Alliance and Why It Won't Take Off

@stablekwon is back, and back with a new proposal for Cosmos security in the form of the Interchain Alliance, as part of a lengthy proposal on the Terra governance forum.

It's not without merits, but here's why it won't work🧵👇
1/ Background

But before we get into that, let's set the stage on what's been going down in the #Cosmos, namely:

• Interchain Security
• Mesh Security
2/ Interchain Security

Interchain Security is a concept for the Cosmos Hub to essentially serve as the center of the Cosmos ecosystem and to secure the chains in it

This is key in the Cosmos ecosystem due to the nature of Proof-of-Stake (PoS) chains. Image
Read 26 tweets
Nov 4, 2022
1.5 billion @instagram users will be able to mint, buy and sell #Polygon NFTs directly on the app.

This has the potential to onboard MILLIONS of users and creators into Web3.

Let's dive into how it works 🧵👇 Image
1/

With this update, users can now support their favourite creators by buying digital collectibles directly on Instagram.

The app will offer an end-to-end toolkit — from creation (starting with the Polygon blockchain) and showcasing, to selling.
2/

Previously, Meta enabled users from over 100 different countries to show off their digital collectibles (NFTs) from 4 different blockchains: Ethereum, Polygon, Solana and Flow.

@solana shows how that works in this video 👇
Read 15 tweets
Nov 3, 2022
Modular blockchains are the NEXT BIGGEST innovation in Blockchain Infrastructure.

Here are 3 reasons why @CelestiaOrg is poised to achieve unparalleled scalability, flexibility and interoperability 🧵 👇 Image
1/ Monolithic vs Modular

Blockchains generally fall into two categories: Monolithic or Modular.

Monolithic: Consensus, Settlement, Execution and Data Availability all in one layer.

Modular: Functions of the blockchain are split into 2 or more layers. Image
Monolithic blockchains typically face a bottleneck, known as state bloat where, as more transactions occur on-chain, more information is required for each full node to verify new transactions.

This makes it costly to run full nodes, leading to limited scalability in most L1s.
Read 20 tweets
Nov 1, 2022
Why Everyone Is Talking About the Art Gobblers 👽

If you've spent anytime on Twitter in the last 24h, surely you would've heard of the Art Gobblers.

But what are @artgobblers, how do they work and what do they mean for the future of NFTs?

Let's take a look 🔎 Image
1/ WHAT are Art Gobblers?

Art Gobblers are an NFT collection launched by @paradigm and @JustinRoiland.

Launching on Halloween, the collection has since surged from a free mint to a floor price of 15 ETH at its peak and raked in more than 6,800 ETH in volume.

But so what? Image
2/ What's SPECIAL about Art Gobblers?

Described as an 'experimental decentralised art factory', Art Gobblers are able to consume art produced by artists on the Art Gobblers site.

In doing so, these pieces of art change the NFT, forever immortalising the art in its belly. Image
Read 18 tweets
Oct 31, 2022
1/ In 2016, an important smart contract on the Ethereum blockchain called The DAO got hacked. A hacker found a loophole in the code allowing him to steal 3.6M ETH.

But if code is law and the claim is made through terms of the smart contract…

Is it really theft?

A thread 🧵
2/

What is The DAO?

DAO is now a generic term for Decentralized Autonomous Organization. But this was THE DAO, the first of its kind.

There was a flaw in the smart contract of The DAO that allowed a hacker to drain $70 million in Ether from it.
3/

The hacker placed the funds into an account subject to a 28-day holding period. This 28-day waiting period gave Ethereum, the DAO and the entire cryptocurrency community time to debate the next steps.

There was controversy about whether this exploit was really a “hack.”
Read 15 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(