Is Defi Coming to Bitcoin Cash? An Overview of Detoken and the Anyhedge Protocol

0
47

You may have heard of Anyhedge. Last April, news.Bitcoin.com published an article about its announcement, but what is it really? What does it do and how does it work?

The Anyhedge Protocol

Anyhedge is an open source protocol. It’s simply a way of using the blockchain (in this case the Bitcoin Cash blockchain) to create a certain type of smart contract. The smart contract here is a “hedge” where the hedge is between Bitcoin Cash (the underlying asset of the BCH blockchain) and another asset. Hence the name “Anyhedge”.

I wanted to understand more about it and checked out the Anyhedge whitepaper. White papers can be intimidating documents, especially because people have gotten used to being spooned up with information. The art of sitting down, concentrating, and mentally meddling to understand something becomes a lost art. But I digress.

“A big advantage of BCH is that the fees are still low, while with Ethereum they get pretty high.”

The first part of the whitepaper tries to explain why Anyhedge is important and what problem it tries to solve. In a word: volatility. Cryptocurrencies have always been volatile, and it’s one of the long-standing problems that crypto naysayers often address.

The white paper then mentions some solutions that have been tried in the past, including exchanging crypto for fiat or using different types of stablecoins. Each of these solutions has its own advantages and disadvantages, which are also listed.

Anyhedge takes a market-driven approach by attempting to enable peer-to-peer risk trading. A big advantage of Anyhedge is that there is not a single point of failure, unlike, for example, a stablecoin supported by Fiat.

However, creating decentralized tools for trading is more than just dealing with volatility issues. It also offers opportunities for speculators, and we know that speculation is a huge part of the market today, for better or for worse. This will attract more users to the Bitcoin Cash chain.

oracle

To understand how Anyhedge works, we must first understand the oracles as they are a key component.

Oracle in Bitcoin is an idea that goes back years. The Bitcoin wiki speaks of using the external status as part of its operations, but it always happens indirectly in Bitcoin. Why? This is because the node software is unable to query an external server or import a status of conditions. If Bitcoin were to be set up in this way, it would drastically affect the entire system and put certain properties at risk – for example the Nakamoto consensus system, which ensures that the majority of honest nodes always outperform attackers.

However, the way the wiki suggests using an oracle is a more primitive method because the oracle evaluates the details of the contract and then interactively provides a signature.

In many ways, this is inferior to the use of a blind oracle that requires no interaction and, in fact, has no awareness of the smart contracts that use the oracle signature. The blind oracle setup uses OP_CHECKDATASIG, a relatively new innovation in Bitcoin Cash (BCH) that Bitcoin (BTC) does not.

In 2018, an op_code called OP_CHECKDATASIG was added to the Bitcoin Cash protocol. There is a good article on this opcode here. With this opcode, a Bitcoin script can check the digital signature of any data. That way, oracles can be used much more efficiently, as the smart contract can be set up without any interaction or permission from the oracle in advance.

A common problem with oracles is that they introduce a point of failure and require trust. However, the blind oracle setup reduces the potential for abuse. In addition, participants who use Anyhedge can choose from different oracles and, in theory, only participate in contracts where the users trust the oracle. In theory, smart contracts could be set up that would allow multiple oracles to be used in different ways, further minimizing risk and reliance on trusted parties.

How Anyhedge works

How does Anyhedge work after we understand something about oracles? The smart contract consists of two parties, referred to in the newspaper as “hedge” and “short”. I find this terminology a bit confusing, so let’s just call it “long” and “short”. Since Anyhedge can be used with any asset (e.g. USD), long and short refer to that external asset. Example: If Alice believes that BCH will go up and USD will go down, and Bob thinks the opposite, then Alice is the dollar short and Bob is the dollar long.

The smart contract also has a due date. The whole thing looks like this: Alice (short for USD) and Bob (long for USD) both put their bitcoin cash (BCH) into the smart contract. At the time of maturity, both are allowed to withdraw Bitcoin cash. When the BCH / USD price goes up, Alice gets more BCH and Bob less. The opposite would happen if the BCH / USD price had fallen.

Is Defi Coming to Bitcoin Cash?  An overview of Detoken and the Anyhedge protocolAn introduction to how Anyhedge works as per the web portal.

The trusted oracle provides a signed message with a price and time stamp, and the smart contract funds can be unlocked if the oracle signature is valid. This is the normal way the smart contracts work – they are closed at the time of maturity. However, there is another way to repay the contract, which is when the price of the asset (e.g. USD) is abnormally high or abnormally low.

The smart contract allows users to set a liquidation price on both the low and high side. When the oracle delivers a signed message and the contract confirms it, the money can be withdrawn. Early liquidation is possible because the price has reached one of the two limits.

There is a third way to enter into the contract, which is a fail-safe mechanism. The two parties can conclude the contract as they wish (if both agree). This would happen, for example, if the oracle stopped working.

That’s it. It’s pretty simple really. Users lock their money in the smart contract address and can only withdraw under the right conditions.

Create market and liquidity

It’s one thing to create an open source protocol on paper and another thing to have a working prototype. And it’s another thing to have a fully functioning ecosystem that requires liquidity for a sufficient number of participants.

This article discusses a few different types of “matchmaking setups”.

One option is to use a central order book. While decentralized exchanges are great in theory, they don’t necessarily provide the most responsive system. Centralized exchanges have their advantages – namely the ability to attract liquidity. In this model, access to the order book itself is permitted. However, this can be combined with a non-custodial-side client-side setup where the benefits of Anyhedge are retained, including no custodial risk.

For this reason, it makes sense that Anyhedge should be used for the first time on a central exchange.

Another method uses the “Federated” model, in which the exchange can communicate with one another via APIs. In theory, anyhedge agreements between exchanges could be coordinated without trust. Collaboration between exchanges can grow along with a global and trustworthy demand pool.

But it is also possible to use anyhedge contracts between two willing parties. An exchange is not even necessary. In practice, order books are required to create an efficient market. As is common in OTC trading, tools can be released for ad hoc contracts. These tools may have lower liquidity and speed, but are also more private and potentially more flexible. They are also impossible to censor and offer more privacy.

Defi and the Bitcoin Cash Advantage

Defi was a big buzzword in 2020, but are regular users getting involved? One of the most lauded applications is the Uniswap smart contract for the Ethereum blockchain, which offers real decentralized exchange functions (Dex).

Similar decentralized services can be built on top of Bitcoin Cash. A big advantage of BCH is that the fees are still low, while with Ethereum they get quite high. That may change in the future when ETH 2.0 is introduced, but it is unclear how long this process can take. Meanwhile, for many applications, BCH is a good low-fee option.

Enter Detoken

Detoken is about to start. It is an implementation of the Anyhedge Protocol.

Is Defi Coming to Bitcoin Cash?  An overview of Detoken and the Anyhedge protocolAccording to the developers Detoken and Anyhedge, very soon.

The people who ran the Cryptophyl token exchange are currently working on the release of this upcoming product, and the fact that there is a business-oriented initiative behind the introduction of this technology is encouraging as it will likely get the attention and resources required Bootstrap liquidity is preserved in this emerging ecosystem.

Detoken plans to allow support for SLP tokens shortly after launch and says it will allow trades without confirmation, meaning users will not have to wait for block confirmations before their transactions are created. They also mention combining atom swaps with detoken so that trusted and untrusted business can be done with users who have full control over their private keys.

What do you think of Anyhedge and Detoken? Let us know what you think on this matter in the comments section below.

Tags in this story

Anyhedge, Anyhedge Protocol, BCH, BCH Defi, Bitcoin Cash, Bitcoin Cash Network, Decentralized Financing, DeFi, Detoken, Jonald Fyookball, SLP Token Support, Technology, Volatility

Photo credit: Shutterstock, Pixabay, Wiki Commons, Anyhedge.com, Detoken,

Disclaimer of liability: This article is for informational purposes only. It is not a direct offer or an invitation to make an offer to buy or sell, or a recommendation or approval of products, services or companies. Bitcoin.com does not provide investment, tax, legal, or accounting advice. Neither the company nor the author are directly or indirectly responsible for any damage or loss caused or allegedly caused by or in connection with the use or reliance on the content, goods or services mentioned in this article.