HomeGuidesChangelog
GuidesDiscussions & SupportGitHubLog In
These docs are for v4.0.0. Click to read the latest docs for v4.4.2.

Syscoin 4.1 Syscoin-Ethereum Bridge

The bridge allows Assets on Syscoin to move back and forth between Syscoin Chain and Ethereum Chain.

The related rpc calls are the following:
syscoinburntoassetallocation / assetallocationburn allows you to move between SYS <-> SYSX (asset on syscoin)

assetallocationburn / assetallocationmint allows you to move from SYSX / or any asset on syscoin <-> extended ERC-20 contract on Ethereum network

In this walkthrough, we will attempt to move 1000 SYS from Syscoin 4.1 Testnet to Ethereum side and back:

Step 1. Move SYS to SYSX (asset on Syscoin 719610612)

$ syscoin-cli getnewaddress
tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc

send some funds to that address

$ syscoin-cli syscoinburntoassetallocation "tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc" 719610612 1000
{
  "hex": "017400000200530205c9608d2d0fb7b8a3dad5d762fd18b13c8fd9c6dc491db644fa31fefa0100000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2ffffffff09441dfd37c873e5f5f83a92e5a1412b777a95edbfe842758f6191f0276b645d0000000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2ffffffff0200e8764817000000586a4c55f462e42a00046275726e01001463f5a2fb89daa39f214f68bf206fc83cd3c765e200e876481700000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffded276481700000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e200000000"
}
$ syscoin-cli signrawtransactionwithwallet 017400000200530205c9608d2d0fb7b8a3dad5d762fd18b13c8fd9c6dc491db644fa31fefa0100000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2ffffffff09441dfd37c873e5f5f83a92e5a1412b777a95edbfe842758f6191f0276b645d0000000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2ffffffff0200e8764817000000586a4c55f462e42a00046275726e01001463f5a2fb89daa39f214f68bf206fc83cd3c765e200e876481700000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffded276481700000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e200000000
{
  "hex": "0174000000010200530205c9608d2d0fb7b8a3dad5d762fd18b13c8fd9c6dc491db644fa31fefa0100000000ffffffff09441dfd37c873e5f5f83a92e5a1412b777a95edbfe842758f6191f0276b645d0000000000ffffffff0200e8764817000000586a4c55f462e42a00046275726e01001463f5a2fb89daa39f214f68bf206fc83cd3c765e200e876481700000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffded276481700000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e202473044022062b34fbc9ae7532990c72eccbb8ac7a9abfc924df431518deb7c31d1f9359a80022024dec9ae003d693524b75b51f9fc21fb1418e008d2379edfb3fa5bc580e2491c012103f33397de51b54f0d0fb729aedcdc9a36c6b0f07c3fbd7a93528eb38d34ebe2ba02473044022078a2df22ea9bbccabf2ad7eed91673c437629c1b4a3f99268b104d3670c45943022054f7b431a0ca5e9f1fe35f41d4c016145f37a5ce8ffec7bca4d99231dee3c6fc012103f33397de51b54f0d0fb729aedcdc9a36c6b0f07c3fbd7a93528eb38d34ebe2ba00000000",
  "complete": true
}
$ syscoin-cli sendrawtransaction 0174000000010200530205c9608d2d0fb7b8a3dad5d762fd18b13c8fd9c6dc491db644fa31fefa0100000000ffffffff09441dfd37c873e5f5f83a92e5a1412b777a95edbfe842758f6191f0276b645d0000000000ffffffff0200e8764817000000586a4c55f462e42a00046275726e01001463f5a2fb89daa39f214f68bf206fc83cd3c765e200e876481700000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffded276481700000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e202473044022062b34fbc9ae7532990c72eccbb8ac7a9abfc924df431518deb7c31d1f9359a80022024dec9ae003d693524b75b51f9fc21fb1418e008d2379edfb3fa5bc580e2491c012103f33397de51b54f0d0fb729aedcdc9a36c6b0f07c3fbd7a93528eb38d34ebe2ba02473044022078a2df22ea9bbccabf2ad7eed91673c437629c1b4a3f99268b104d3670c45943022054f7b431a0ca5e9f1fe35f41d4c016145f37a5ce8ffec7bca4d99231dee3c6fc012103f33397de51b54f0d0fb729aedcdc9a36c6b0f07c3fbd7a93528eb38d34ebe2ba00000000
0c574d23213996b9b9c37830f797ba96fec580d650aaeaf1fdf437f944851ebe

Wait a bit and check to see the SYS has been moved to asset SYSX
$ syscoin-cli listassetallocations
[
  {
    "asset_allocation": "719610612-burn",
    "asset_guid": 719610612,
    "symbol": "SYSX",
    "address": "burn",
    "balance": 887998910.00000000,
    "balance_zdag": 887998910.00000000
  },
  {
    "asset_allocation": "719610612-tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc",
    "asset_guid": 719610612,
    "symbol": "SYSX",
    "address": "tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc",
    "balance": 1000.00000000,
    "balance_zdag": 1000.00000000
  }
]
$ syscoin-cli assetallocationbalance 719610612 tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc
{
  "amount": 1000.00000000
}

The following can be done on bridge.syscoin.org. Follow the procedure and sign the transaction with your node.

Step 2: Burn the allocation to go across the bridge. Use bridge.syscoin.org

Now the token is on Ethereum side. You can view it by going to your metamask -> add token -> custom token -> and add "0x2e80da144b22AC10517DF6CA64fEc1c843215255"

Step 3: Burn the ERC token to come back to Syscoin blockchain. Use bridge.syscoin.org

Step 4: Burn the allocation to mint as Syscoin.

$ syscoin-cli assetallocationburn 719610612 tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc 100 ""

$ syscoin-cli signrawtransactionwithwallet 007400000112bfa44239a3cbf3b9b430a0c0d10eca9864674e4833864d036fb6a6ef1a645b0000000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2ffffffff0300e40b540200000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e20000000000000000586a4c55f462e42a001463f5a2fb89daa39f214f68bf206fc83cd3c765e20100046275726e00e40b540200000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff78d976481700000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e200000000
{
  "hex": "0074000000010112bfa44239a3cbf3b9b430a0c0d10eca9864674e4833864d036fb6a6ef1a645b0000000000ffffffff0300e40b540200000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e20000000000000000586a4c55f462e42a001463f5a2fb89daa39f214f68bf206fc83cd3c765e20100046275726e00e40b540200000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff78d976481700000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2024730440220406498d4a8d66dea997426f33cdba7dff0333a03192466155f966d642491317602202bf652213c724dc356249c807bf5d3f0b79fd6fe35717b845244d2ffbeaec534012103f33397de51b54f0d0fb729aedcdc9a36c6b0f07c3fbd7a93528eb38d34ebe2ba00000000",
  "complete": true
}
$ syscoin-cli sendrawtransaction 0074000000010112bfa44239a3cbf3b9b430a0c0d10eca9864674e4833864d036fb6a6ef1a645b0000000000ffffffff0300e40b540200000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e20000000000000000586a4c55f462e42a001463f5a2fb89daa39f214f68bf206fc83cd3c765e20100046275726e00e40b540200000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff78d976481700000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2024730440220406498d4a8d66dea997426f33cdba7dff0333a03192466155f966d642491317602202bf652213c724dc356249c807bf5d3f0b79fd6fe35717b845244d2ffbeaec534012103f33397de51b54f0d0fb729aedcdc9a36c6b0f07c3fbd7a93528eb38d34ebe2ba00000000
ed37d5ce838e38c80a127d3e119bf8ab07d35bac38b96ecfff5c8f64acda8aeb

The assetallocation has been burnt and we can check the new balance

$ syscoin-cli assetallocationbalance 719610612 tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc
{
  "amount": 900.00000000
}

Note down the blockhash of the burn by using gettransaction on the txid

$ syscoin-cli gettransaction ed37d5ce838e38c80a127d3e119bf8ab07d35bac38b96ecfff5c8f64acda8aeb
{
  "amount": 100.00000000,
  "fee": -0.00003720,
  "confirmations": 3,
  "blockhash": "00000c9f4fb172c4796c324635116126e63b89dcec5890031bbcb5e323b972e8",
  "blockindex": 1,
  "blocktime": 1562791471,
  "txid": "ed37d5ce838e38c80a127d3e119bf8ab07d35bac38b96ecfff5c8f64acda8aeb",
  "walletconflicts": [
  ],
  "time": 1562791427,
  "timereceived": 1562791427,
  "bip125-replaceable": "no",
  "details": [
    {
      "address": "tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc",
      "category": "send",
      "amount": -100.00000000,
      "label": "",
      "account": "",
      "vout": 0,
      "fee": -0.00003720,
      "abandoned": false,
      "systx": {
        "txtype": "assetallocationburntosyscoin",
        "asset_allocation": "719610612-tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc",
        "asset_guid": 719610612,
        "symbol": "SYSX",
        "txid": "ed37d5ce838e38c80a127d3e119bf8ab07d35bac38b96ecfff5c8f64acda8aeb",
        "height": 2622,
        "sender": "tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc",
        "allocations": [
          {
            "address": "burn",
            "amount": 100.00000000
          }
        ],
        "total": 100.00000000,
        "blockhash": "00000c9f4fb172c4796c324635116126e63b89dcec5890031bbcb5e323b972e8"
      }
    }
  ],
  "hex": "0074000000010112bfa44239a3cbf3b9b430a0c0d10eca9864674e4833864d036fb6a6ef1a645b0000000000ffffffff0300e40b540200000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e20000000000000000586a4c55f462e42a001463f5a2fb89daa39f214f68bf206fc83cd3c765e20100046275726e00e40b540200000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff78d976481700000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2024730440220406498d4a8d66dea997426f33cdba7dff0333a03192466155f966d642491317602202bf652213c724dc356249c807bf5d3f0b79fd6fe35717b845244d2ffbeaec534012103f33397de51b54f0d0fb729aedcdc9a36c6b0f07c3fbd7a93528eb38d34ebe2ba00000000"
}

DONE! You just completed the journey to Ethereum and back!