Doge/Ethereum Bridge Progress

Ross Nicoll bio photo By Ross Nicoll

Before I start, we have a bit of a naming problem. This happens with decentralised projects, anyone can name anything and… well now’s there’s Dogethereum and Dogethereum and they’re very different projects. Both are made by teams external to the main Dogecoin Core team, but otherwise they’re very different. One is a token issued on the Ethereum chain based on coins held at a fixed point in time, the other (the one we’ll be talking about today) is a smart contract and supporting tools for transferring the value of Dogecoins onto the Ethereum chain and more importantly, back again. I’m going to refer to this as a Doge/Ethereum bridge, or simply bridge.

If you’re ready to jump into the technical details, you can see the team’s own docs at https://github.com/dogethereum/docs . Otherwise lets start with some background.

Why?

For Dogecoin, being able to use Dogecoins with Ethereum smart contracts gives us a whole new world of functionality. Any Ethereum smart contract that can use general tokens, can work with the bridge tokens. On-chain multisig wallets, bounty contracts (such as the one for the Doge/Ethereum bridge) etc. are suddenly all available to the Dogecoin ecosystem.

For Ethereum, it provides a long term currency that’s well established, and less volatile, making it perfect for use in transactions.

How?

I dislike casino metaphors, but they’re effective. Think of poker chips. You exchange currency you have for poker chips of equivalent value, can use them within the casino, and when you’re finished at the casino you cash your chips back out to currency. The bridge works in a similar way; you can exchange native Dogecoins for a token on the Ethereum chain, use them as you would any other token, and exchange them back for Dogecoins when you’re done.

What Does This Look Like?

The tricky part is how you do that exchange in a decentralised environment. We can’t have a single party handle the exchange (as you would in a casino), because there’s no trust relationship. Instead we have a smart contract on the Ethereum chain handle issuing tokens for Dogecoins. There’s a similar contract for Bitcoin already, but the Scrypt hashes Dogecoin uses are much more expensive to validate, which has been a challenge. The harder part has been getting the coins back, though.

The Bitcoin to Ethereum smart contract requires Bitcoins are burnt by sending them to an unrecoverable address. In the case of a bridge, however, Dogecoins are locked while they’re in use on the Ethereum chain, and unlocked to cash out. This requires management of the locking process, and here we introduce the role of Operator. An Operator takes on the responsibility for holding Dogecoins while they’re “locked”. To get tokens, a Dogecoin user sends coins to an Operator, and submits proof to the Ethereum smart contract, which issues them tokens.

To cash back out again, they send tokens to the smart contract, and an Operator sends them Dogecoins of equivalent value. This is a somewhat simplified version of the process, which skips the details of how the Ethereum contracts verify transactions, and it just intended to give a quick introduction.

The result looks a something a bit like this (again, simplified):

Flow Diagram of Doge-Ethereum transfer

What Next?

The immediate next step is there will be a demo of this on 5th September for the panel of judges which control the bridge development bounty (I’ll be present, Max unfortunately cannot attend). Presuming we’re satisfied with the result, we’ll then release the next chunk of the bounty payment to the development team.

The remaining chunk of the bounty is being held back for work to complete the work on returning Dogecoins from tokens. Once that’s in place we’ll then look at setting up infrastructure (operator nodes, block submitters, etc.) to launch the bridge, and establish exactly how we’ll make this work for the typical user. Given that using the bridge requires running two different wallets together, it is likely this won’t be something the average user wants to do, and they will instead trade via an exchange. The bridge itself will exist primarily to balance demand between native Dogecoins and Dogecoin-on-Ethereum tokens, to ensure the value of the two stays equivalent.

Further Reading

If you want the full details, you can read the bridge team’s original documentation at https://github.com/dogethereum/docs, which includes links to the various contracts and tools required.

Ross