top of page

The Pedagogical Palette: Exploring Diverse Teaching Methods

Shielded Pools: How Aleph Zero’s Flagship Product, Common, is Implementing Shielded Pools




Introduction


The bedrock of transactions that take place on blockchain networks is transparency. Every participant of a blockchain system can see transactions on the network every second as they come in, which is not the case in traditional financial institutions. This transparency has proven effective in creating a trustless system and fishing out individuals and institutions who use crypto transactions for illegal activities as transactions can be traced to wallets.


In contrast to what we think, the blockchain system as we know it today gives room for pseudonymity and not actual privacy. Every transaction is publicly visible for everyone to see the addresses behind every transaction but can’t point out the individuals behind the addresses. This, no doubt, has its pros and cons. Anonymity seemed to be enough until recent blockchain projects came into the space and released a range of tools that can link addresses to the real identities behind them within a specific blockchain system. 


However, the world keeps evolving and the possibilities of technology (including blockchain tech) keep growing. In the search for true privacy, zero-knowledge tech found its way into the blockchain space. With zero-knowledge proofs, users’ privacy is protected as cryptography is used to prove knowledge about data but the content of the data is not revealed.


With concerns to data privacy, there is a not-so-new concept called shielded pools utilized by a few blockchains to render transactions untraceable, hence enhancing privacy.



What are shielded addresses?


Typically, analytical platforms allow users to track real-time data of crypto transactions, enabling them to see all the trades that happen on every token. Block explorers are also publicly available for anyone to monitor transactions and the addresses behind them. As a result of this, MEV attacks happen a lot. This is possible because the addresses are transparent for all to see, making the addresses unshielded. With or without the use of zero-knowledge tech, public addresses can be validated. Conversely, shielded addresses encrypt transaction data and require the creation of ZK-SNARKs to confirm the legitimacy of the transaction. Shielded addresses are provided by “Sapling,” a term presumably first used in Zcash shielding protocol.



What are shielded transactions?


Shielded transactions are transactions that occur between two shielded addresses. A shielded address sending funds to a shielded address will result in a shielded transaction, just as how an unshielded address sends funds to an unshielded address will result in a transparent transaction (like we’re familiar with). However, a transparent address sending funds to a shielded address will result in a shielded transaction.


Zcash, a privacy-focused cryptocurrency is known to have pioneered the use of zero-knowledge tech for privacy (particularly ZK-SNARKs) in the cryptocurrency system. Zcash provides users with the option to send either transparent or shielded transactions. Shielded transactions are encrypted such that information like wallet addresses, amounts, and even transaction history are untraceable. Zcash users can send shielded transactions when they have shielded Zcash addresses. This tends to improve privacy and secrecy. One limiting factor with the Zcash approach is that it supports a single asset only - its native token $ZEC.



What is sapling?


Sapling is a protocol that facilitates transactions of fungible tokens, through a decentralized tech, to preserve users’ privacy. Sapling offers the shielded transactions feature, which limits transaction participants from viewing addresses and amounts. Aside from making shielded transactions possible, Sapling also reduces computational complexity.



What are shielded pools?


Just like regular pools, shielded pools are pools comprising crypto asset(s). However, unlike regular pools, even the most basic form of identity (wallet addresses, in the crypto space) of individuals who pool their assets in shielded pools are well hidden from outside observers. They are protocols for depositing tokens with an emphasis on privacy that protects various assets, including fungible and non-fungible tokens. Additionally, shielded pools are designed with algorithms that synchronize user incentives, rewarding users who add tokens to the pool to contribute to shielding.



Types of shielded pools


Single-asset shielded pools: These are pools that allow for the sending and receiving of a single asset like Zcash does.


Multiple-asset shielded pools: These are pools that allow multiple crypto assets to exist in a single shielded pool. Various assets and asset types cohabiting in a pool creates a diversified pool that is large enough to conceal transactions and make them impossible to track




The mechanism of typical shielded pools


Shielded pools make use of zero-knowledge proofs and encrypted notes. The more tokens deposited in a shielded pool, the more hidden the transactions are in the pool. Let’s examine how shielded transactions, addresses, and pools typically work using our famous on-chain couple, Bob and Alice.


Assuming Bob wants to send Alice 350 in the quantity of XYZ tokens from his regular transparent address and he doesn’t want anyone to know anything about the transaction not even the amount. Bob first creates a new wallet containing his shielding address (assuming he doesn’t already own one). He then converts his 350 XYZ to shielded tokens using a shielding protocol, after which he deposits the shielded tokens to the protocol’s shielded pool (where multiple tokens deposited by others also reside). The shielded pool “mixes” the tokens in it so it would be difficult to know the location an output comes from. Meaning, that inputs are not directly linked to outputs. 


Bob’s newly created wallet is credited with the shielded 350 XYZ and his transparent wallet is debited of 350 XYZ. The 350 XYZ tokens are sent to Alice’s address from the pool and she won’t have much access to other information about the sender except the value of the token sent (if she receives it via a regular public address). However, if she receives it with a shielded address, she can see any other encrypted info sent by Bob. No outsider will be able to trace the transaction because there is no publicly visible record of the transaction data.


Shielded pools are more efficient in providing privacy when the tokens are deposited in the pools for a long (or average) period because it will be much more difficult to link a withdrawal to a deposit that took place days after. 


Few protocols offer options for users to deposit assets in shielded pools but many are yet to grasp the potential of this. A project can employ shielded pools so that only specified asset types on its blockchain can be added to the shielded pool.



Benefits of shielded pools


  • Privacy in asset transfers: Shielded pools help keep transactions private and confidential, thereby securing the financial data of users.


  • Voting: Zero-knowledge proofs in shielded pools ensure vote integrity and voters’ anonymity across various blockchains.


  • Improvement in the privacy of DeFi activities: DeFi activities like borrowing, lending, and farming are typically publicly visible for anyone to monitor. With shielded pools, DeFi users can be kept fully anonymous, if they wish to do so.



Aleph Zero's shielded pool



Aleph Zero’s shielded pool is referred to as Shielder, and here’s how it works:


Aleph Zero’s Shielder is a smart contract that employs ZK-SNARKS in ensuring private DeFi interactions. As I earlier mentioned, Shielder, like other shielded pools, makes it impossible for external observers to monitor users’ outputs. 


Deposit: Users can deposit PSP22 tokens to the Shielder using an Aleph Zero account. The tokens will become encrypted notes inside the Shielder and cryptographic keys will be generated for each user’s deposit. Inside the pool, there are different tokens (now encrypted notes) deposited by other users, so every deposit will be “mixed” to prevent withdrawals from being traced.


Withdrawal: For users to withdraw all or part of their deposited tokens, they’ll create a new Aleph Zero account and request their desired amount of tokens using the cryptographic keys. The Shielder smart contract sends the requested funds to the users’ new accounts (eliminating any previous trace to them). The previous notes inside the Shielder will be canceled to accommodate the new notes showing the users' new balances inside the pool. An external observer can see that withdrawals were made but would have no idea who made them because new accounts were used to receive them. Hence, there is no link between the deposit made and the withdrawal carried out.


On the other hand, Aleph Zero’s Shielder supports what is called an optional anonymity revoker which is a party responsible for revoking the anonymity (deanonymizing) of users in extreme circumstances.



Note: PSP22 is a token standard for any fungible token built using WebAssembly (WASM) smart contract and running on blockchains that are based on the Substrate framework. Aleph Zero fits into the picture as it supports private smart contracts that employ WASM rather than EVM. Also, the Aleph Zero network was built using the Substrate stack.


PSP22 is Polkadot Standards Protocol 22 because it was first adopted by the Polkadot ecosystem. It is best referred to as the ERC20 standard for the WASM part of the ecosystem to help differentiate tokens built on WASM smart contracts.



How Aleph Zero's flagship product, Common, implements shielded pools to enhance privacy


Common is the first product built on the Aleph Zero blockchain. It is a privacy-enhancing DeFi suite that makes trading efficient. It is best known as an order-book DEX that allows users to choose which information to keep private.


One of the problems that Common has set itself to solve is the front-running MEV attack, where a trader disrupts a transaction going into the blockchain by copying it but using a higher gas fee to front-run his/her transaction. You can learn more about Common and its general features here, but this piece aims to simplify how Aleph Zero’s DEX, Common, is implementing its shielded pool to enhance the privacy of users who want to use the DEX.


Common runs as an order book incorporated with a shielded pool that allows users to trade and place private orders that are only revealed on execution, hence providing confidentiality to users and preventing front-running attacks. The shielded pool protects the details of the values of every order and users can decide to store their assets in the shielded pool as it is optional to do so. Two features make privacy in Common possible and they are ZK-SNARKS and a cryptographic primitive called Decryption Oracle. While ZK-SNARKS helps with anonymity, Decryption Oracle helps users maintain the total confidentiality of their orders.


Following Aleph Zero’s commitment toward compliance, Common integrates compliance procedures like KYT (Know Your Transactions) to prevent malicious transactions that are aimed at illegal or criminal activities from entering the shielded pool.



Conclusion


Late last year, one of the most popular centralized crypto exchanges, OKX announced that it would delist almost all privacy tokens from its platform, advising users to withdraw the affected assets before the delisting date (slated for January 5th, 2024). This action is not foreign as several exchanges have taken steps or attempted to delist or suspend deposits of privacy-related tokens in the past; Huobi, in 2022. This decision often stems from the lack of proper token management policy and compliance success.


In OKX’s case, it’s safe to assume that these privacy tokens no longer meet the transparency criterion for spot trading following the concerns about the platform’s outlined listing criteria. Another probable cause for this may be the intensifying pressure on financial privacy which is growing stronger. This news isn’t a cause for alarm as to whether privacy tokens or privacy-enhancing protocols have a future. There are blockchains out there still pushing the gospel of users’ privacy, whilst maintaining their stance on the need to obey compliance obligations. Aleph Zero is a typical example of a blockchain that fits this description.


Aleph Zero’s native token is not a privacy token, however, the blockchain is dedicated to its mission of providing an infrastructure for privacy-enhanced projects, as long as they comply with AML/CFT regulations. Its native DEX, Common comes into play by allowing users to trade seamlessly without the feel of a pair of eyes tracking their transactions. Through order batching, multiparty computation (MPC), and the integration of ZK-SNARKs, Common hides order values. When combined with the fact that users never leave the shielded pool when using the platform, you can tell that Common offers a high degree of privacy.



References


  • Learn more about Common here


  • Dive into the technicalities of Aleph Zero's shielded pool here



Comments


Recommended

Subscribe Us

Get the latest creative news from CodeTavren magazine