How It Works

A brief overview of RenVM shifts tokens between blockchains.

Work in progress! This documentation is under active development and is not complete.

Gateways

One of the most important concepts in RenVM is that of a gateway. A gateway is an address on a guest blockchain (e.g. a Bitcoin address on the Bitcoin blockchain) that has been generated in a very specific way. When tokens are transferred to this gateway, RenVM will respond by taking custody of those tokens and minting a representation of them onto a host blockchain (e.g. an ERC20 representation of BTC on the Ethereum blockchain). The way in which the gateway is generated defines (a) how many tokens are shifted from the guest blockchain to the host, (b) which address on the host blockchain receives the newly shifted tokens, and (c) extra application-specific payload data.

Generating Gateways

A gateway can be generated independently of any other information. This allows for independent verification that the gateway has been generated correctly. The exact requirements differ depending on the guest blockchain and the host blockchain. When introducing support for new blockchains, RenVM must formally commit to a specific way of generating gateways.

BTC0Btc2Eth

The BTC0Btc2Eth RenVM contract is used to send BTC from the Bitcoin blockchain (the guest blockchain) to the Ethereum blockchain (the host blockchain). The data required to generate a valid gateway is:

  • The keccak256 hash of the application-specific payload data encoded using the Ethereum ABI encoding.

  • The amount of SATs to be shifted.

  • The receiving address on Ethereum that will receive the shifted BTC.

  • A random 32 byte nonce.

USDT0Btc2Eth

The USDT0Btc2Eth RenVM contract is used to send USDT from the Bitcoin blockchain (the guest blockchain) to the Ethereum blockchain (the host blockchain). The data required to generate a valid gateway is:

  • The keccak256 hash of the application-specific payload data encoded using the Ethereum ABI encoding.

  • The amount of USDT cents to be shifted.

  • The receiving address on Ethereum that will receive the shifted USDT.

  • A random 32 byte nonce.

ZEC0Zec2Eth

The ZEC0Zec2Eth RenVM contract is used to send ZEC from the ZCash blockchain (the guest blockchain) to the Ethereum blockchain (the host blockchain). The data required to generate a valid gateway is:

  • The keccak256 hash of the application-specific payload data encoded using the Ethereum ABI encoding.

  • The amount of ZATs to be shifted.

  • The receiving address on Ethereum that will receive the shifted ZEC.

  • A random 32 byte nonce.

Transferring to Gateways

Transferring tokens to a gateway can be done like any other transfer to any other address. The fact that an address is a gateway should be opaque to the user, other than their ability to independently verify that the gateway was generated correctly.