My Authors
Read all threads
Ethereum Testnet Update

Latest update using a method suggested by @0xEther

Thread on how it works.

rinkeby.etherscan.io/address/0x1069…
Step 1)

Call `deposit()` with 0.1 ETH, and memo:

SWAP:ETH.TKN-0x6D052e01B0C60d8c1aBB6C936651f9bf55633CD4:0x<yourAddress>

Remember - you are trying to pass transaction intent through to THORChain.
The contract will receive the deposit and emit an event once confirmed on-chain.

This only happens once it is confirmed. Every THORNode is hooked to an Ethereum node and will receive the event logs.
The Ethereum Bifrost will then parse the deposit, retrieve the memo and prepare a witness transaction for THORChain.
This is then sent into THORChain from all nodes.

Once consensus on the event is received then THORChain will process the swap.
Importantly, balances are entirely virtual. To swap ETH to a Token, there are four balances of three assets in three places:

RUNE:ETH
RUNE:TKN

RUNE: On Binance Chain TSS Vault
ETH: On Ethereum TSS Vault
TKN: In Ethereum Vault Contract
When the swap is computed, the txOut is designated:

This is a chain-agnostic instruction to pay the transaction.

It also designates which vault is paying it.
Bifrost will then recognise that it needs to prepare a transaction and it does so, by creating a transaction and delegating it to the TSS routine:
Finally, the tx is signed and broadcasted.

In this case, it is the TKN, so Bifrost has prepared a ERC-20 transfer and inserts the memo to record the transaction:
And that is how the swap is done.

Importantly, the only Ethereum nuances that THORChain deals with is ERC-20 and their contract methods.

This is the purpose of the Vault Contract - to serve as a static entry point for ERC20.

The community is welcome to provide feedback.
Missing some Tweet in this thread? You can try to force a refresh.

Keep Current with THORChain ⚡️(ᚱ)

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!