Syscoin Core Developer Portal

Comprehensive guides and documentation to help you start working with Syscoin as quickly as possible, and support if you get stuck.

Get Started

HOWTO: Use the Bridge with the SYSX SPT

The Syscoin Bridge with Ethereum became active on mainnet at block height 348,000.

It enables tokens to be transferred between the Syscoin and Ethereum blockchains.

.----------------------------.            .----------------------------.
|     Syscoin Blockchain     |            |    Ethereum Blockchain     |
.----------------------------.            .----------------------------.
|        Syscoin (SYS)       |            |       Ethereum (ETH)       |
'----------------------------'            '----------------------------'
              ^                                         ^
              |                                         |
              |  SYS<->SPT bridge                       |  DEX
              |                                         |
              v                                         v
.----------------------------.            .-----------------------------.
|Syscoin Platform Token (SPT)|            |        Smart Contract       |      
.----------------------------.  SPT<>ETH  .-----------------------------.
|           SYSX             |<---------->|       ERC-20 based SYSX     |  
.----------------------------.   Bridge   .-----------------------------.
|                            |            |                             |
|          ANY SPT           |  SPT<>ETH  |    Any ERC-20 Based Token   |
|                            |<---------->|                             |
'----------------------------'   Bridge   '-----------------------------'

In this walkthrough, we will move 500 SYS from Syscoin 4.1.2 Mainnet to Ethereum side and back:

1. SYS (Syscoin native coin) to SYSX, an SPT (Syscoin Platform Token)

Follow the guide below to move SYS to SYSX (Asset GUID of this SPT is 1045909988)

Use the following command to create a funding address:

> getnewaddress

Send to it the amount of SYS you wish to transfer, and add a few extra SYS for fees.

Enter the following command to burn your SYS to the SYSX token (replace the Xs with your funding address):

> syscoinburntoassetallocation "[enter your funding address here, without the square brackets]" 1045909988 [enter the amount to transfer here, without square brackets]

The command will return a hex that looks something like this:
  "hex": "01740000014cf4b4d4b2982806fd87dc12ed8493572de02f5ddbadfffa93cb0f7621c0ee0700000000160014841de8b852e2e7a7f80e83d4da80306159ffcebbfeffffff0200743ba40b0000002c6a2ae451573e00046275726e010014841de8b852e2e7a7f80e83d4da80306159ffcebb00743ba40b00000000129db77500000000160014841de8b852e2e7a7f80e83d4da80306159ffcebb00000000"

Use the hex returned from the previous command to sign the raw transaction:

> signrawtransactionwithwallet [enter you hex here, without square brackets]

This will return another hex that looks something like this:
  "hex": "017400000001014cf4b4d4b2982806fd87dc12ed8493572de02f5ddbadfffa93cb0f7621c0ee070000000000feffffff0200743ba40b0000002c6a2ae451573e00046275726e010014841de8b852e2e7a7f80e83d4da80306159ffcebb00743ba40b00000000129db77500000000160014841de8b852e2e7a7f80e83d4da80306159ffcebb02473044022022b7acf5578e8e0b4e1813fa2e3f7677c61bd76a752b1d76f5ec680517cde8a8022027955255366daa2f37700908fb85140d6f62dadb85799637ee7902337cde91ac01210355b16dbd96f4112d4f919a18e50c38ba6ca8b7e62cfab7eca156c559900a482a00000000",
  "complete": true

Use the hex returned from the previous command to send the raw transaction:

> sendrawtransaction [enter hex here]

Wait a few minutes and check that the SYS has been moved to asset SYSX:

> listassetallocations 0 0 '{"asset_guid":1045909988,"addresses":[{"address":"[enter your funding address here without the square brackets]"}]}'

It should return data for your newly created SYSX token (in this example we transferred 500 SYS):

    "asset_allocation": "1045909988-sys1qssw73wzjutn607qws02d4qpsv9vlln4mn7mgu3",
    "asset_guid": 1045909988,
    "symbol": "SYSX",
    "address": "sys1qssw73wzjutn607qws02d4qpsv9vlln4mn7mgu3",
    "balance": 500.00000000,
    "balance_zdag": 500.00000000

You can also use the following command to view only the SYSX token balance:

> listassetallocations 1045909988 sys1qssw73wzjutn607qws02d4qpsv9vlln4mn7mgu3
  "amount": 500.00000000

Now the 500 SYS has been converted to an SPT called SYSX!

The following steps can then be carried out on the Syscoin-Ethereum Bridge tool at Follow the procedure and sign the transaction with your node.

2. SYSX (SPT) to SYSX (ERC-20) on Ethereum

Burn the allocation to go across the bridge to the Ethereum World!
This step has a user-friendly interface on Follow the steps there for moving tokens from Syscoin Platform to Ethereum.

By the end of the SYS->ETH process on, the token should be on the Ethereum side. You can view it by going to your metamask -> add token -> custom token -> and add "0x3a0d746b3ea1d8ccdf19ad915913bd68391133ca"

3. SYSX (ERC-20) on Ethereum back to SYSX (SPT)

Burn the ERC token to come back to Syscoin blockchain. Use

At the end of ETH->SYS process on you should be able to see it back on Syscoin blockchain

> listassetallocations 0 0 '{"asset_guid":1045909988,"addresses":[{"address":"sys1qmpdj3h8z7dvm6z2843tpym3cma0n47setat97g"}]}'
    "asset_allocation": "1045909988-sys1qmpdj3h8z7dvm6z2843tpym3cma0n47setat97g",
    "asset_guid": 1045909988,
    "symbol": "SYSX",
    "address": "sys1qmpdj3h8z7dvm6z2843tpym3cma0n47setat97g",
    "balance": 20.00000000,
    "balance_zdag": 20.00000000

4. SYSX (SPT) to SYS (Syscoin native coin)

Burn the allocation to mint as Syscoin.

$ syscoin-cli assetallocationburn 1045909988 sys1qmpdj3h8z7dvm6z2843tpym3cma0n47setat97g 12 ""
  "hex": "0074000001564c5350e2d64ce9c6a251498a1a5ada7431e1f025b499ae469f2c976d00e51e01000000160014d85b28dce2f359bd0947ac56126e38df5f3afa19feffffff0300ca9a3b00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa1900000000000000002c6a2ae451573e0014d85b28dce2f359bd0947ac56126e38df5f3afa190100046275726e00ca9a3b0000000000508fe49a00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa1900000000"

$ syscoin-cli signrawtransactionwithwallet 0074000001564c5350e2d64ce9c6a251498a1a5ada7431e1f025b499ae469f2c976d00e51e01000000160014d85b28dce2f359bd0947ac56126e38df5f3afa19feffffff0300ca9a3b00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa1900000000000000002c6a2ae451573e0014d85b28dce2f359bd0947ac56126e38df5f3afa190100046275726e00ca9a3b0000000000508fe49a00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa1900000000
  "hex": "00740000000101564c5350e2d64ce9c6a251498a1a5ada7431e1f025b499ae469f2c976d00e51e0100000000feffffff0300ca9a3b00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa1900000000000000002c6a2ae451573e0014d85b28dce2f359bd0947ac56126e38df5f3afa190100046275726e00ca9a3b0000000000508fe49a00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa190247304402202b581b8345a80168705cb3f716112f2327b5968f55b03b8dba20642b57af81e102205bd9e2f036bedac90222bef5ef9e79a4ae8371b701928782e262e7fa0c41fa860121025fa57c9e3f283f697c5660a77d318be8d2091903812600733fe160421f0f367a00000000",
  "complete": true
$ syscoin-cli sendrawtransaction 00740000000101564c5350e2d64ce9c6a251498a1a5ada7431e1f025b499ae469f2c976d00e51e0100000000feffffff0300ca9a3b00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa1900000000000000002c6a2ae451573e0014d85b28dce2f359bd0947ac56126e38df5f3afa190100046275726e00ca9a3b0000000000508fe49a00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa190247304402202b581b8345a80168705cb3f716112f2327b5968f55b03b8dba20642b57af81e102205bd9e2f036bedac90222bef5ef9e79a4ae8371b701928782e262e7fa0c41fa860121025fa57c9e3f283f697c5660a77d318be8d2091903812600733fe160421f0f367a00000000

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

$ syscoin-cli assetallocationbalance 1045909988 sys1qmpdj3h8z7dvm6z2843tpym3cma0n47setat97g
  "amount": 8.00000000

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

Appendix 1. Related RPC calls

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

Updated 7 months ago

HOWTO: Use the Bridge with the SYSX SPT

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.