CanYa releases ‘hedged escrow’ to protect platform users from price volatility

CanYa has built the first hedged-escrow system for crypto assets. This is a significant technical milestone and is delivering on a goal set out in the CanYa whitepaper. Asset volatility is still a major impediment for the global adoption of digital assets, therefore the CanYa Hedged Escrow, being open source, could benefit any number of projects in the space.

The trustless hedged escrow ensures that when a user books a service, its value will remain static independent of any $CAN token price volatility.

This is fundamental to CanYa’s adoption and use case.

The problem

Any fiat based marketplace platform can protect against bad actors (ie customers not paying for a job or merchants taking the money for a job and not delivering) by pre-authorised payment, usually via credit cards. CanYa, using cryptocurrency, cannot do this and therefore needs to hold cryptocurrency in escrow until the job is complete. However, this presents its own unique problem due to the price volatility of cryptocurrency while it is held in escrow.

For example, if you are paying a freelancer on CanWork to build your new website this job may take a month or more. The job was agreed upon for $1000 USD worth of $CAN which was put into escrow. During the month long escrow process the price of $CAN could have dropped by 20%. The escrow is now worth $800 USD and the freelancer will either lose out or demand the client to add more funds to the escrow in which case the client will lose out. By creating a ‘trustless hedged escrow’ this problem is avoided. The job value will be pegged to a $USD amount that will automatically remain static without any centralised governance. This means clients and freelancers can use CanWork to book real jobs with all the benefits of cryptocurrency without the downside (price volatility).

The Solution

The Hedged Escrow process is a trustless way to ensure job value remains constant on the CanYa platform despite the price of $CAN. This process is completely automated and trustless using smart contracts, the DAI stable-coin and the Bancor network.

DAI: Dai is an Ethereum ERC20 token that is pegged to $1 USD — every Dai is worth $1, and will always be worth $1, regardless of how much Dai is in existence. The beauty of DAI is that it is completely trustless and uses very smart incentives to ensure that the price is always moving towards $1USD. This is as opposed to centralised stable coins like Tether who rely on a centralised entity and their reserves of $USD.

Note: CAN is never actually converted into DAI, the DAI simply signals a USD price on-chain for the contract.

Bancor: Bancor’s Asynchronous Price Discovery: allows anyone to buy and sell tokens in the Bancor Network directly from the web, at prices automatically calculated by the open source Bancor Protocol formula.

The beauty of Bancor’s formula is that this price isn’t static, it is dynamic. With each buy or sell, the price floats. If people buy these tokens by sending some ETH to the smart contract, the price increases. The opposite happens if people sell. As a result, the price signalled from the Bancor contract is always the fair market price of the asset, if it is not, then someone will act in their self-interests and arbitrage the difference for their own gain.

The Hedged Escrow Process:

The $CAN deposited into the escrow is valued in DAI (USD pegged stable coin) utilising the functionality provided by Bancor’s on-chain token converters.

These contracts essentially act as a bridge to the Bancor Oracle so that we can calculate the USD value of CAN as it enters the escrow.

On the contract side of things we have deployed two contracts: the Bancor (BNT) Price Oracle and the Dai (DAI) Price Oracle, which are responsible for the CAN:BNT and BNT:DAI price conversion (and inverse conversion) respectively.

The DAI/USD value is stored on-chain and utilises the same converters when the money is released from the escrow in order to get the CAN amount once the contract is executed.

There is a pool of liquidity for $CAN that secures the escrow. If the job value decreases the liquidity pool sends $CAN to the contract. Likewise, if the job value increases $CAN is sent from the escrow back to the liquidity pool.

Once the job is finalised the client will click pay on the CanWork platform. The hedged escrow (which has remained at a constant value) will close and the $CAN tokens will automatically be sent to the freelancer’s wallet.

Click this link to view the CanYa Hedged Escrow code in github.

What does this mean for CanYa?

This is a significant technical achievement for the CanYa ecosystem and in particular CanWork. CanWork is designed to have millions of users and has an incredibly strong value proposition for freelancers all over the world. This value proposition is now even stronger as our users will have all of the benefits of cryptocurrency use without its downside (price volatility).

While volatility remains a topical concern for the crypto landscape we are delighted that we can do our part to remove these concerns for our platform users.

With future developments (CANExchange), we are planning to provide support for all ERC20 tokens, which will make CanWork, CanSeek and other associated dApps in our ecosystem some of the most advanced crypto payment rails available.

For all the latest news and updates follow us here: