Cassini | BitSong Ethereum<->Mainnet Bridge

What Cassini Bridge is?

The Cassini Bridge will allow the BitSong community to seamlessly transfer their BTSG tokens between the BitSong and Ethereum networks. The bridge will be available for testing until August 15th, and we’re now inviting interested community members to start testing it.

Currently, the bridge operates using centrally managed hot wallets with liquidity provided by BitSong. The bridge will be overseen by bridge workers, who will monitor for transactions between the Ethereum and BitSong networks. Upon validation, smart contracts will execute the fund transfer across the bridge with instant finality.

The bridge is currently deployed on Ethereum’s Ropsten testnet and the BitSong testnet. Validators will need to be running Node.js 14 and a MySQL database to save the status of transactions. A version of MySQL is available through Docker. Once installed, the bridge will start scanning for transactions, and you can begin sending test transfers. Cassini also supports postgres and sqlite.

How Does the Bridge Work?

Mainnet → Ethereum

  • 1a) User send a standard transaction on Cosmos Side to the Bridge hot wallet, inserting his Ethereum address in the memo field
  • 2a) Bridge worker look for transfer events onchain
  • 3a) Tokens arrive in mainnet hot wallet, and are liquid in the bridge
  • 4a) With instant finality we can immediately send tokens on Ethereum side, from the hot wallet.

Ethereum → Mainnet

  • 1b) User send a deposit() transaction to the BitsongBridge smart contract address, specifying amount of tokens and the recepient Cosmos btsg1 address
  • 2b) Bridge worker lookf for hasBeenAddedd logs from the smart contract
  • 3b) Smart contract transfer the tokens to Ethereum hot wallet
  • 4b) After 21 confirmations, a standard send transaction is generated and broadcasted on mainnet side from the hot wallet to the recepient.

Token bridge test

The bridge is currently deployed on Ropsten ETH Netowrk and bitsong-bridge-1 Bitsong testnet.

Cosmos Bridge Wallet Address bitsong14ayssdzwd6tdspcnn6zyhfwvlh6cv93cxtd0fz

Ethereum Bridge Wallet Address 0x8Ff25a5954E42B7f990C523C0e25c0e5dEDfC326

Ethereum Bridge Smart Contract Address 0x234745EcfeDfa32113D8203462A23ba410e0FC87

Ethereum Token Contract Address 0x4d439d3a5bad256433461b80a06c4ab452734a4a

Min amount accepted by the relayer to transfer 10 BTTT

Test transfer from Cosmos to Ethereum

  1. Install bitsongcli binary at version v0.7.1
  • wget https://github.com/bitsongofficial/go-bitsong/releases/download/v0.7.1/bitsongcli
  • chmod +x bitsongcli
  • ./bitsongcli version

  1. Transfer the tokens you want to bridge with the recepient ethereum address in the memo field of the transaction:
  2. bitsongcli tx send {from} bitsong14ayssdzwd6tdspcnn6zyhfwvlh6cv93cxtd0fz 10000000000ubtsg --memo "0x{your eth address}" --node tcp://bridge-test.bitsong.network:26657 --chain-id bitsong-bridge-1 Unit: 1BTTT = 1000000ubtsg

  1. You will receive tokens after a few minutes on Ethereum. Depending on network congestion

Once you got the transaction executed, you can query your account balance as follows:

./bitsongcli query account bitsong1pccr3n9t39xmrsvvnnrytfz7asveh5vmlk9aj2 --node tc p://bridge-test.bitsong.network:26657 --chain-id bitsong-bridge-1

Optionally, whoever wants can set by default:
Node, Chain ID and Keyring

./bitsongcli config node tcp://bridge-test.bitsong.network:26657

./bitsongcli config chain-id bitsong-bridge-1

./bitsongcli config keyring-backend test

Test transfer from Ethereum to Cosmos

1. Approve the bridge contract as spender of your BTTT tokens. This can be done on Etherscan with MetaMask, visiting BitTestToken | 0x4d439d3a5bad256433461b80a06c4ab452734a4a and choosing “approve”


_spender must be set to the Bridge Contract address 0x234745EcfeDfa32113D8203462A23ba410e0FC87

_value must be greater than the amount you want to transfer, in wei. you can use https://eth-converter.com/ to convert. For example, if you want to transfer 10.000.000 BTTT, you must set it greater than 10000000000000000000000000

2. Transfer BTTT tokens to the bridge contract using the “deposit” function. This can be done in Etherscan with MetaMask: BitSongBridge | 0x234745EcfeDfa32113D8203462A23ba410e0FC87. Set as target the mainnet address that should receive your tokens.
amount is the amount of tokens you want to transfer, in wei unit. target is the bitsong address that will receive the tokens:

3. After 12 confirmations on Ethereum network tokens will be transfered to your mainnet address.

ITS TOO DIFFICULT. I DIDN’T UNDERSTAND THIS METHOD.Please upload a video so users can understand easily