Confidential Assets and Ionic Swaps—Benefits and Applications

Confidential Assets and Ionic Swaps—Benefits and Applications
Robots trying to analyze a Zano Confidential Asset VS robots analyzing an asset running on a transparent blockchain.

In our previous blog post [link] we introduced Zano Confidential Assets (CA's)—secondary assets that will live on the Zano chain and benefit from the same enterprise-grade security features as Zano itself: hidden addresses, hidden amounts, and IP obfuscation. Additionally, all tokens will be completely indistinguishable to outside observers, making it impossible to tell which CA's are involved in a transaction. All this is coming in the rapidly approaching Zarcanum hard fork (date TBA) along with an improved version of Atomic Swaps that we’ll cover later in the article.

Aside from providing much stronger protection against bad actors, the unique properties of  Zano Confidential Assets make possible an entirely new class of security-enhanced dApps and dApp components. We’ll explore some exciting possible use cases for CA's that third-party developers and teams, or—resources permitting—the Zano team itself, might choose to work on. We begin with one that an outside team is already actively working on …

Censorship-resistant Stablecoins

From the beginning, one of our goals with the project was to create a decentralized ecosystem with incomparable security, facilitated by our idea of perfect money: secure, fungible, digital cash. Although we intended Zano itself to serve this function, the rise to dominance of stablecoins has since shown that a predictable price may be a prerequisite for an asset to achieve mass adoption as a medium of exchange. Many people just don’t want money that can fluctuate wildly in value from one day to the next.

So stablecoins such as USDT, USDC and BUSD have assumed the role of digital cash with assets such as Zano, Bitcoin and Ethereum acting more like securities. But stablecoins are not without shortcomings. Imagine, for instance, if traditional cash had a self-destruct feature: a remote kill-switch that let a central authority turn your banknotes into Monopoly money if they thought they were associated with a crime. “We believe that hundred dollar bill came from a robbery”… *click*… deactivated. “Please contact customer support if you believe this is a mistake.” Would you feel more or less secure holding such a currency? Would businesses be more or less likely to accept payments in it? Because this is essentially how the current dominant stablecoins work.

It’s sort of the ultimate anti-feature for money, and the ability to render funds at certain addresses "wholly and permanently unrecoverable" is being utilized more and more often. Understandably, some will never feel comfortable trusting meaningful amounts of capital to such assets.

Zano Confidential Assets make possible a new class of stablecoin that cannot be abused through censorship. Digital cash with fungibility restored. It has the potential to be the killer application that underpins the expanded Zano universe, and as mentioned, a third-party team is already working on creating the first Confidential Asset stablecoin. We’re very eager to see the results.

Zano Trade and Ionic Swaps

After giving users the ability to create Confidential Assets, the next logical step is to provide them with a way to securely exchange them. Enter Zano Trade, an all-in-one trading platform that allows for peer-to-peer trades similar to LocalMonero utilizing Zano's Escrow Contracts for settlements, an on-chain Zano Decentralized Exchange (zDEX), and an instant swap feature. The technology that will underlie Zano Decentralized Exchange (zDEX) will also come as part of the Zarcanum hard fork, and to understand it, we must first look at Atomic Swaps.

A proof-of-concept of Zano Trade, showcasing the UI of the P2P Trading page.

In June 2021, we implemented HTLC-based Atomic Swaps. The hope was that it would help usher in a new era of simple, non-custodial cross-chain exchanges; but adoption of atomic swaps across the industry has been slow. This is likely due, at least in part, to one major inefficiency in the current design, as explained in this Bitmex blog post:

When trading one cryptocurrency asset for another in any fully non-custodial system, one party must act first and the second party must follow. In theory, at some point, this second party then has optionality: – he or she can either follow through and complete the trade, or take no action and stop the trade. In the time interval between the first party taking the necessary action and the second party being required to act, if the price of the token the second actor is attempting to buy falls in value, or the price of the token he is selling increases in value, he could refuse to complete the trade.” [link]

When you consider the fact that the second party often has up to 24 hours to finalize the swap, the extent of the advantage that this “optionality” gives them becomes all the more clear.

We believe we have solved this inequality with a refined version of Atomic Swaps called Ionic Swaps. These swaps work in much the same way as Atomic Swaps, but with one key difference: both parties have the ability to cancel the exchange up until the point that the second party finalizes, i.e., the “optionality” mentioned above now belongs to both parties until the transaction is complete.

Ionic Swaps are a safe and consistent way to perform peer-to-peer swaps in which neither party has an unfair advantage. It’s upon this technology that a Zano private Decentralized Exchange (zDEX) would be based. It would require no user registration, as is the case with most popular DEXs (Uniswap, Sushiswap etc.), and would use an on-chain order matching system to facilitate Ionic Swaps between Zano and the Confidential Assets. More details can be found in the white paper.

Zano Companion

In order to make it our ecosystem work in a way that's familiar to the average DeFi user, we needed a missing link—a Metamask-like (browser) extension called Zano Companion.

The extension works on top of a local wallet, doesn't store anything, and just provides the interface. It could be used as a wallet to send and receive transactions, sign messages, and manage Confidential Assets.

The main feature would ofcourse be web authentication. It will allow users to connect to the Zano Trade app with their Zano Alias. Being able to use your alias to log in is a crucial piece to make the Zano ecosystem very user-friendly, and we're happy to report that we're getting there!

“Shielding” public assets

It’s also likely that we will see the establishment of bridges from chains with non-optional transparency to the Zano chain. This will allow for tokenized assets to be converted to Confidential Asset versions, shielding them, as it were, for operations that require the highest possible levels of discretion and security.

In the case of the common metaphor of the DeFi lego blocks from which dApps are composed, Zano and CA's can be thought of as the DeFi lego block for enterprise-level security—something that both users and developers will surely want to make use of.

Rendering Various Attacks and Unwanted Behaviors Impossible

The non-optional transparency of first generation token schemes made certain types of attack and undesirable behaviors inevitable. With Confidential Assets, many become impossible.

MEV Attacks

You go to Uniswap to buy a token, you place your order, execute… and you end up receiving significantly less of the token than you expected. You check the pair’s order history and find that a large buy was made just before yours, pushing the price up, with a large sell following immediately after your order went through. You’ve been “front-run”, and probably not for the first time. This class of attack is only possible because first generation token transactions and the DEXs built around them reveal all critical information about transactions before they’re finalized (the tokens involved, slippage tolerance, transaction fee etc.). And this enables bots to extract money from your trades in the manner described.

With Ionic Swaps of Confidential Assets the details of an order cannot be intercepted and exploited, because the details are only available to the parties directly involved in the trade. Front-running, back-running and “sandwiching” attacks: all impossible. Users 1 v Bots 0.

Attacks using publicly visible holdings

The collapse of the Terra and UST ecosystems in May of last year, wiped out $60 billion of value in a matter of days. It caused a crisis in confidence for DeFi that it has yet to recover from. How did it happen? According to one leading theory, the perpetrators used information about the Luna Foundation Guard’s (LFG) strategies and holdings to carry out a diabolical, Soros-esque attack.

If true, there were two critical pieces of information that made the attack possible. Firstly, the extent of LFG’s Bitcoin purchases between March and April of last year was public knowledge. As Coindesk reported: “Thanks to the transparency of Bitcoin, we can watch along as LFG moves UST towards a bitcoin-backed existence” [link] and there was 39,797.98 of  BTC in their wallet as of April 6th 2022.

Secondly, the attacker(s) was able to see the precise moment when LFG withdrew $150m of UST from Curve Finance [link], leaving liquidity low and making it far less costly to make it lose peg and eventually unravel.

Of course, the entire UST/LUNA debacle can just as easily be construed as a cautionary tale against non-collateralized stablecoins, ponzinomics, hubristic public proclamations of strategy, and so on, but it’s clear that the transparency of the chain played its part.

With Zarcanum and zAssets, we’ve made it possible to carry out many fundamental crypto asset operations while revealing significantly less information than was previously necessary. It’s our sincere hope that by integrating them into existing and future protocols, the exploitation that has caused such enormous damage to our industry’s reputation will be made all but impossible.

Conclusion

As mentioned previously, it was always our mission with Zano to create "perfect" money: digital, decentralized, fungible, and secure. With the Zarcanum upgrade and the new breed of ultra-secure stablecoins that CA's make possible, we’re closer than ever to achieving that goal. But an economy is more than just sound money. A fully-fledged financial system has a wide range of applications, instruments and activities.

Zarcanum and Confidential Assets will transform Zano from a secure, single-asset chain, to an ultra-secure, multi-asset, decentralized financial universe. From hosting Zano alone, to potentially hosting more than one fungible digital currency... shielded versions of assets from less secure chains… in-game weapons, assets and traits... and who knows what else! All tradeable on a permissionless platform—Zano Trade, powered by Ionic Swaps and Escrow Contracts, all secured by the most robust and advanced cryptographic protocols.

Truth be told, just as when the ERC-20 token standard was published, we don’t know all the potential future use cases for the technology. It’s very likely that even more exciting applications will come from the imaginations of builders inspired by the new possibilities that Zarcanum, Confidential Assets and Ionic Swaps provide. And of course, as the currency in which transaction fees are paid, all new use cases will bring increased demand for Zano itself.

We’ve provided the building blocks for a new class of dApps and protocols that are maximally secure by default, and we can’t wait to see what people do with them.

Written by @OrsonJ.