January 23, 2026

Capitalizations Index – B ∞/21M

How to Transfer 0xBTC with no ETH – infernal_toast – Medium

How to Transfer 0xBTC with no ETH – infernal_toast – Medium

If you are like me, you are fascinated by the idea that there is a pure mined currency running on top of (inside of?) Ethereum with over 10TH/s of SHA3 Proof of Work hashpower. However, the fact that you also need ETH to pay for gas is annoying. Why not just pay for gas using 0xBTC? It is a digital currency after all.

At the moment, the Ethereum miners processing Ethereum Transactions do not accept ERC20 tokens as incentive to include a new tx. That is a story for another time. So what if we just set up middleman servers that converted ERC20 tokens to ETH and then forwarded that ETH + the tx data to the Ethereum miners?

In order to do this trustlessly, we just need to be able to verify offchain signatures in Solidity. Fortunately, with ECRecover and EIP712, this is very easy to do! Metamask even supports Signed Typed Data for added user friendliness.

The Lava Protocol is a new standard for signing typed data that describes an ERC20 token transaction with a fee paid in tokens. This is very similar to a ‘signed check’ in real life and is also called a ‘lava packet’. The difference is, it is cryptographically secure and anyone can turn it into the Ethereum Network for a reward paid in ERC20 tokens!

The Solidity contract that makes this possible is called the Lava Token contract. In this case, it is a 1:1 Proxy Token for 0xBTC with an extra method called transferTokensWithSignature that accept the following input parameters of a Signed Lava Packet:

string methodName; //approve, transfer, or a custom data byte32 for ApproveAndCall()
address relayAuthority; //address that is allowed to be msg.sender, use 0 for ANY
address from; //the packet origin and signer
address to; //the recipient of tokens
address wallet; //this contract address
uint256 tokens; //the amount of tokens to give to the recipient
uint256 relayerRewardTokens; //the amount of tokens to give to msg.sender
uint256 expires; //the eth block number this packet expires at
uint256 nonce; //a random number to ensure that packet hashes are always unique
bytes signature; //a signature that can only be created with the pKey of ‘from’

Using ECRecover, the contract verifies that the token owner (from) really did produce the signature for the hash of all of this data. If so, the contract conducts the transaction! Here is how that looks in practice at http://relay.0xbtc.io :

  1. Atomic swap 0xBTC to LAVA Proxy Token, 1:1 (you can always swap back)

https://etherscan.io/tx/0xacff03194343462e8b6a11b7a9dd4de485ca73a09d39c9fb20b051da81ab8e90

2. Generate an offchain signature for a new LAVA transaction using software that supports EIP712 like Metamask

3) Provide this Lava Packet (10 input parameters + signature) to any Lava Relay Node (https://github.com/admazzola/lava-relay-node) and it will process the transaction, paying the ETH fee and claiming the ‘Relay Reward (tokens) as payment.

As soon as a Lava Relayer gets their hands on that data, they will inspect the Fee to see if it is high enough. If so, they will submit the transaction to the Ethereum Mainnet like this:

4) Once the transaction goes through, the recipient will have received the ERC20 tokens even though you had absolutely no ETH! This was all done trustlessly and with the same elliptic-curve signature algorithms used for Ethereum TX themselves, just processed in solidity. If you want, you and the recipient can convert the LAVA Proxy tokens back to 0xBTC with an on-chain method.

Protip: By taking advantage of the ApproveAndCallWithSignature feature, you can actually convert your LAVA back to 0xBTC with no ETH by using a middleman ‘Fire Contract’, a contract like this: https://etherscan.io/address/0x16118cfdbf415e06291e79b72e3b793647fe2dd6#code

Published at Sat, 16 Mar 2019 23:37:23 +0000

Previous Article

Crypto 🔴 24/7 Live 🚀 Cryptocurrency, Bitcoin, Ethereum & Altcoin Trading Price Index🚀

Next Article

Security Tokens – Not Bitcoin – is MakerDAO’s Most Exciting New Feature

You might be interested in …

New alis. Io - the sick doublesplit? (best moments)

NEW ALIS.IO – THE SICK DOUBLESPLIT? (BEST MOMENTS)

NEW ALIS.IO – THE SICK DOUBLESPLIT? (BEST MOMENTS) PLAY GAVER.IO ● TWITTER? https://twitter.com/AgarioGamer ● PAGINA? https://goo.gl/m64ozR ● Instagram – https://goo.gl/vFcKcr ► If you want to support me ► SKIN – http://i.imgur.com/fvgt6PE.png ♫ Music 1 – […]