An Overview Of Detoken And The Anyhedge Protocol Focusing On If Defi Is Coming To Bitcoin Cash?- Part 2
More on Detoken. Here we highlight the smart contracts. What are they doing?
From The Previous Post
Having a maturity date also is a smart contract. Going like this is the whole thing: putting their bitcoin cash into the smart contract was Alice (short on USD) and Bob (long on USD). They both are allowed to withdraw bitcoin cash at the time of maturity. Alice gets more BCH and Bob gets less if the BCH/USD price goes up. If the BCH/USD price had gone down, the opposite would happen.
The smart contract funds can be unlocked when the oracle signature is valid as the trusted oracle provides a signed message with a price and time stamp. As they get closed out at the time of maturity, this is the normal way that the function of the smart contract. If the price of the asset such as USD goes unusually high or unusually low, however, there is another way that the contract can be redeemed.
On both the low and the high side, the smart contract allows the users to specify a liquidation price. The funds can be withdrawn again if the oracle provides a signed message and the contract validates it. As price has reached one of the two boundaries, early liquidation is possible.
Which is a failsafe mechanism, there is a third way to close out the contract. As long as they both agree, the two parties can close out the contract anyway they want. For example, this would happen if the oracle stops operating.
Here is it pretty simple really. They can only withdraw under the right conditions as users lock their funds in the smart contract address.
Creating The Market And Liquidity
To create an open-source protocol on paper is one thing and to have a working prototype is another thing. This requires liquidity in terms of a sufficient number of participants, it's yet another thing to have a fully functioning ecosystem.
Discussing A Few Different Types Of “Matchmaking Setups” Is The Paper
Using a centralised order book is one option. They don’t necessarily provide the most responsive system although decentralised exchanges are great in theory. Namely the ability to attract liquidity, centralised exchanges have their advantages. Access to the order book itself is permission in this model. That which preserves the advantages of Anyhedge including having no custodial risks, however, this can be combined with a noncustodial client-side setup.
It makes sense that the first deployment of Anyhedge will be on a centralised exchange for this reason.
The Federated model in which exchanges can communicate with each other via APIs is what another method utilises. Between exchanges, in theory, Anyhedge contracts can be trustlessly coordinated. Along with a global and trustless pool of demand, cooperation between exchanges can grow.
Between any two willing parties, it is also possible to use Anyhedge contracts. Not even necessary is an exchange. Order books are necessary to create an efficient market in practice. Tools can be released for ad-hoc contracts just as OTC trading is common. As they are also more private as well as potentially more flexible, these tools may have lower liquidity and speed. Offering more privacy, they are also impossible to censor.
Defi And The Bitcoin Cash Advantage
Are ordinary users getting involved as Defi was a huge buzzword in 2020? Providing true decentralised exchange capabilities, one of the most praised applications is the Uniswap smart contract on the Ethereum blockchain.
They can be built on bitcoin cash with similar decentralised services. While they are getting quite high on Ethereum, one major advantage that BCH has is that fees are still low. It is unclear how long that process may take as that may change in the future as ETH 2.0 is rolled out. BCH is a good low fee option for many applications in the meantime.
Finally, Enter Detoken
About to be launched is Detoken. An implementation of the Anyhedge
protocol is this.
The fact that there is a business-driven initiative behind the rollout of this technology is promising since it is more likely they receive the attention and resources necessary to bootstrap liquidity in this nascent ecosystem as the folks who ran the Cryptophyl token exchange is busy working on the release of the upcoming product.
This means users don’t have to wait for block confirmations before their transactions are created, Detoken is planning to allow SLP token support shortly unlike bitcoin after launching and says they will allow zero-confirmation trades. So that trustless and noncustodial trades can be accomplished with users having full control of their private keys, they also mention combining atomic swaps with Detoken