An Overview Of Detoken And The Anyhedge Protocol Focussing On If Defi Is Coming To Bitcoin Cash?- Part 1
What are Detoken and Anyhedge? How are they influencing Bitcoin Cash and Bitcoin? Here is the detailed report on them.
The Introduction
You may have heard of Anyhedge. What is it really, as last April, an article was published about its announcement? The questions relevant are what does it do and how does it work?
The Anyhedge Protocol
An open-source protocol is Anyhedge. To create a specific type of smart contract it is simply a way to use the blockchain in this case, the Bitcoin Cash blockchain. Where the hedge is between Bitcoin Cash the underlying asset of the BCH blockchain and any other asset, the smart contract here is a hedge. The name was hence kept as Anyhedge.
We took a look at the Anyhedge whitepaper since we wanted to understand more about this. Mostly we think because people have grown accustomed to information being spoon-fed to them, whitepapers can be intimidating documents. Becoming a lost art is the art of sitting down, focusing, and burrowing in mentally to understand something. Whereas we digress.
What the problem it is trying to solve, the first part of the whitepaper attempts to explain why Anyhedge is important. Volatility is the reason in a word. It's one of the long standing issues that crypto naysayers frequently bring up as cryptocurrencies have always been volatile.
Including exchanging crypto into fiat or using various kinds of stablecoins, the whitepaper then mentions some solutions that have been tried in the past. Which are also enumerated, each of these solutions has its own advantages and disadvantages.
By attempting to enable peer-to-peer risk trading, Anyhedge takes a market-based approach. Unlike, for example, a fiat backed stablecoin, one big advantage of something like Anyhedge is that there is no single point of failure.
Doing more than just handle volatility issues whereas creating decentralised tools for trading. We know that speculation makes up a large part of the market today for better or for worse as it also offers opportunities to speculators. To the Bitcoin Cash chain, this will attract more users.
Oracles
First, we need to understand oracles as they are a key component thereby understanding how Anyhedge works.
An idea that goes back years are oracles in bitcoin. This is always done indirectly in bitcoin as the bitcoin Wiki talks about using the external state as part of its operations. The question here is why? Not capable of polling an external server or importing a state of conditions is because of the node software. It would then drastically impact the entire system that comprises certain properties as for example the Nakamoto consensus system that ensures that the majority of those honest nodes will then always outpace attackers if bitcoin were to be set up in such a way.
As it involves the oracle evaluating the specifics of the contract and then interactively providing a signature, the way the Wiki suggests using an oracle is a more primitive method.
In fact, doesn’t have any awareness of the smart contracts utilising the oracle signature as in many ways this is inferior to using a blind oracle that doesn’t require any interaction. This is a relatively new innovation on Bitcoin Cash which doesn’t exist on bitcoin, the blind oracle set up uses OP_CHECKDATASIG.
Called OP_CHECKDATASIG, in 2018, an op_code was added to the bitcoin cash protocol. For a bitcoin script to check a digital signature of any arbitrary piece of data, is what this opcode allows is. As the smart contract can be set up ahead of time without any interaction or permission from the oracle as this allows oracles to be used in a much more powerful way.
That they introduce a point of failure and require trust is one common problem with oracles. The potential for misuse is reduced however with the blind oracle setup. Theoretically only participating in contracts where the users trust the oracle, in addition, participants using Anyhedge could choose from different oracles. Further minimising risk and reliance on trusted parties, in theory, smart contracts could be set up that allows multiple oracles to be used in various ways.
How Anyhedge Works
How does Anyhedge work, now that we understand a bit about oracles? Which the paper calls Hedge and Short, there are two parties to the smart contract. Let's just call them long and short as we find the terminology slightly confusing. Its this external asset that the long and the short refer to since Anyhedge can be used with any asset such as USD. Here is an example where Alice thinks BCH then goes up as the USD then goes down and while Bob thinks the opposite, Alice comes short the dollar with Bob is long the dollar.
To Be Continued…
Here we wind up the discussion to continue with more info in the second part. Stay tuned.