Relay UPX token between Ethereum and Binance Chain

UDAP
4 min readJul 10, 2019

Dear UDAP community members and Binance DEX community members,

We are excited to announce that UDAP is in the process of applying for launching on Binance Chain before the end of August. As part of the prerequisite, UDAP need to establish a mechanism to relay UPX token between Ethereum and Binance Chain. This article explains the rationale behind our plan to migrate UPX to Bianance chain and particularly our implementation of the migration tool.

· Why do we choose Binance DEX?

  1. We believe DEX is the future of crypto exchanges. Trading on DEX, it’s the user, not the exchange, who has full control with the funds.
  2. CZ and his team have shown their professionals and have done a really good job. The UI of Binance DEX is fabulous and ease to use, and the speed of the chain is super fast.
  3. The more exchanges UPX is listed on, the more liquidity of UPX tokens.
  4. Lots of projects have listed tokens on Binance DEX and a lot more are on their way to be listed. Joining in the Binance DEX big family will make UDAP stand in the same room with the rest of good crypto projects.

· What have we built for swapping UPX ERC20 token with UPX BEP2 token?

  1. In order to balance the trading ability of UPX token on DEX and the utility of UPX token on the Ethereum ecosystem, we have designed a double swap relay Dapp to swap between UPX ERC20 token and UPX BEP2 token. This tool is also open sourced.
  2. The total supply of UPX ERC20 token is 10 billion, and we have issued 1:1 number of BEP2 tokens on Binance Chain. By default all issued BEP2 tokens will be locked in two accounts, the relay cold wallet and relay hot wallet.
  3. We have deployed a relay smart contract on Ethereum mainnet to lock the UPX ERC20 tokens. When users request to relay some of their UPX ERC20 tokens to Binance Chain, their UPX ERC20 tokens will be locked on the relay contract and same amount of UPX BEP2 tokens will be transferred from relay hot wallet on Binance Chain to users’ Binance address. The whole process can be illustrated by the following diagram:

4. Similarly, when users want to relay their UPX BEP2 tokens to UPX ERC20 tokens by using our open sourced relay Dapp, they will transfer their BEP2 tokens to relay hot wallet to locked up, then the same amount of UPX ERC20 tokens will be transferred from the relay contract to users’ wallet.

· Basic rules

  1. The BEP2 tokens issued on Binance Chain will stay at two wallets, relay cold wallet and relay hot wallet, and can not be trading.
  2. Relay cold wallet can only transfer BEP2 token to relay hot wallet or receive BEP2 token from relay hot wallet.
  3. All user’s BEP2 tokens are unlocked from relay hot wallet.
  4. When unlocking BEP2 tokens from relay hot wallet, the corresponding Ethereum transaction hash of locking ERC20 token must be given and recorded on Binance Chain.
  5. Similarly, when unlocking ERC20 tokens from relay contract, the corresponding Binance Chain transaction hash of locking BEP2 token must be given and recorded on Ethereum.

· Security concerns

  1. How to make sure the total circulation amount does not exceed 10 billion?

a) The tokens on the relay cold wallet, on the relay hot wallet and on the relay smart contract are locked by default.

b) Only when user’s UPX ERC20 tokens are locked in the relay contract, the same amount of UPX BEP2 can be unlocked from relay hot wallet to user’s Binance Chain wallet.

c) Similarly, only when user’s UPX BEP2 tokens are locked to the relay hot wallet, the same amount of UPX ERC20 tokens can be unlocked from relay contract to user’s Ethereum wallet.

2. How to guarantee UDAP will not take the locked tokens away secretly?

At present, due to the lack of atomic swap support on Binance Chain, some actions still needs the trust of UDAP. But we have set our rules clear, have recorded our moves on chain and have open source our code. So that everyone can check the logic and check our moves on chain. In the future, if Binance Chain is upgraded to support the atomic swap, we can make this relay process more decentralized.

· How to swap tokens?

  1. UPX ERC20 to UPX BEP2

a) Go to our relay Dapp, login with your Ethereum wallet

b) Fill in your Binance Chain address to receive UPX BEP2 and the UPX amount for swap

c) Click “Swap” and wait for the transaction to be confirmed on Ethereum. Then the corresponding amount of UPX BEP2 will be transferred to your Binance Chain address.

2. UPX BEP2 to UPX ERC20 (To be implemented)

a) Go to our relay Dapp, login with your Binance Chain wallet

b) Fill in your Ethereum address to receive the UPX ERC20 and the UPX amount for swap

c) Click “Swap” and wait for the transaction on Binance Chain to be confirmed. Then the corresponding amount of UPX ERC20 will be transferred to user’s Ethereum address.

· Fees

  1. Users are responsible for the gas fees when transferring UPX from user’s ethereum address to the Relay’s ethereum address.
  2. Currently UDAP covers transfer fees from the Relay’s Binance address to user’s Binance address, however, we may implement a swap fee in the future.

· Development progress

  1. Swap from UPX ERC20 token to UPX BEP2 token (done and open sourced)
  2. Swap from UPX BEP2 token to UPX ERC20 token (in development till mid Sep.)

· Notes

  1. Relay Dapp: https://relay.udap.io
  2. Relay Dapp source code: https://github.com/udap/upx-binance
  3. All the swapping activity must be done on our relay Dapp, otherwise it may fail to swap the tokens.

--

--

UDAP

Universal Ðecentralized Asset Platform — a Blockchain Middleware for Tokenizing Everything.