Shibes on ethereum. A team of developers have claimed 25% of the doge relay bounty ($125k) for their work on bridging dogecoin with ethereum.

The proof of concept shows how one can freeze dogecoins on the doge chain, receive dogetokens on the ethereum chain, and then get back their dogecoins by “burning” the dogetokens. Sina Habibian, a protocol developer at TrueBit, says:

“The sticking point, and the reason why the bridge hadn’t been built so far, is that the Ethereum relay needs to verify Dogecoin’s Proof-of-Work. Scrypt is a memory-hard and computationally intensive function, and cannot be computed within the Ethereum block gas limit.”

The solution was to “run Scrypt off-chain and verify it using Truebit’s interactive protocol.” With Truebit being a smart contract based second layer that outsources eth computations.

At the very top in happy yellow we have the doge blocks moving one after the other. Everything else is happening on the ethereum side. Habibian says:

“The claimant is someone who is supplying block headers to the DogeRelay contract. A block header involves a number of fields, and a proof of work field. So the DogeRelay contract verifies that the script hash was calculated correctly, kicks off a request to the ClaimManager contract,” and now in the light green box, basically everything on the left immediately below the doge-chain, is the TrueBit protocol.

“The ClaimManager contract has received the plaintext, the hash, and a proposalID, and at this point a new claim is created.” That is the TrubitClaimant claims the given plaintext fields when run through a scrypt function give a particular hash.

The Truebit verifiers are kind of nodes which analyze the claim, computing its functions, and see if it is correct. Now if the claimant and the verifiers agree on the hash and all the rest, it’s simple. Where it gets interesting and where we can see how Truebit works is where they disagree.

First of all, both the claimants and the verifiers have a certain amount staked in the contract, so they would disagree only if there is a good reason to do so, unless they like losing money.

Where there is a disagreement, the process goes to ScryptVerifier. The ScryptVerifier asks the claimant for the state half-way through the computation. So if there are 2,000 steps, it asks for the Merkle root of the state at step 1,000.

If they agree, then the problem was in the other 1,000. If they still disagree, it repeats the process at step 500, 250 and so on until the computation becomes so small the ScryptVerifier runs on the blockchain and computes it itself.

Then, the ultimate blockchain court comes with a guilty for the verifier or the claimant, and accordingly punishes the guilty party by slashing the deposit.

In this way, millions of computations can happily run without fully requiring the blockchain, but where they disagree they can just run it on the blockchain for the ultimate source of truth.

Of course if the blockchain says the claimant effectively lied, the contract manager disqualifies the contract. But if all is fine, and the submitted scrypt Proof of Work checks out, it sends it back to the DogeRelay contract which then creates the wow dogetokens.

That all is simplified for the demo, but it’s enough as a proof of concept to show this works as verified by the dogerelay bounty judges who have awarded the team 25% of the bounty for this early stage demo.

Since this is the blockchain space and the team wanted to have some fun, they spent that money on some work of art. Unfortunately, it had no memes. Whatamigonedo. There, now it has memes.