Syscoin

Syscoin Core Developer Portal

Welcome to the Syscoin Core developer portal. You'll find comprehensive guides and documentation to help you start working with Syscoin as quickly as possible, as well as support if you get stuck.

Get Started

Syscoin-Ethereum Bridge

As of block height 348000, the Syscoin-Ethereum bridge is now LIVE!

The bridge allows Assets on Syscoin (SPTs) to be transferred between Syscoin Chain and Ethereum Chain.

.----------------------------.            .----------------------------.
|     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 attempt to move 500 SYS from Syscoin 4.1.2 Mainnet to Ethereum side and back:

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

Follow the guide below to move SYS to SYSX (asset guid on Syscoin is 1045909988)

> getnewaddress
sys1qssw73wzjutn607qws02d4qpsv9vlln4mn7mgu3

send some funds to that address

> syscoinburntoassetallocation "sys1qssw73wzjutn607qws02d4qpsv9vlln4mn7mgu3" 1045909988 500
{
  "hex": "01740000014cf4b4d4b2982806fd87dc12ed8493572de02f5ddbadfffa93cb0f7621c0ee0700000000160014841de8b852e2e7a7f80e83d4da80306159ffcebbfeffffff0200743ba40b0000002c6a2ae451573e00046275726e010014841de8b852e2e7a7f80e83d4da80306159ffcebb00743ba40b00000000129db77500000000160014841de8b852e2e7a7f80e83d4da80306159ffcebb00000000"
}
> signrawtransactionwithwallet 017400000200530205c9608d2d0fb7b8a3dad5d762fd18b13c8fd9c6dc491db644fa31fefa0100000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2ffffffff09441dfd37c873e5f5f83a92e5a1412b777a95edbfe842758f6191f0276b645d0000000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e2ffffffff0200e8764817000000586a4c55f462e42a00046275726e01001463f5a2fb89daa39f214f68bf206fc83cd3c765e200e876481700000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffded276481700000016001463f5a2fb89daa39f214f68bf206fc83cd3c765e200000000
{
  "hex": "017400000001014cf4b4d4b2982806fd87dc12ed8493572de02f5ddbadfffa93cb0f7621c0ee070000000000feffffff0200743ba40b0000002c6a2ae451573e00046275726e010014841de8b852e2e7a7f80e83d4da80306159ffcebb00743ba40b00000000129db77500000000160014841de8b852e2e7a7f80e83d4da80306159ffcebb02473044022022b7acf5578e8e0b4e1813fa2e3f7677c61bd76a752b1d76f5ec680517cde8a8022027955255366daa2f37700908fb85140d6f62dadb85799637ee7902337cde91ac01210355b16dbd96f4112d4f919a18e50c38ba6ca8b7e62cfab7eca156c559900a482a00000000",
  "complete": true
}
> sendrawtransaction 017400000001014cf4b4d4b2982806fd87dc12ed8493572de02f5ddbadfffa93cb0f7621c0ee070000000000feffffff0200743ba40b0000002c6a2ae451573e00046275726e010014841de8b852e2e7a7f80e83d4da80306159ffcebb00743ba40b00000000129db77500000000160014841de8b852e2e7a7f80e83d4da80306159ffcebb02473044022022b7acf5578e8e0b4e1813fa2e3f7677c61bd76a752b1d76f5ec680517cde8a8022027955255366daa2f37700908fb85140d6f62dadb85799637ee7902337cde91ac01210355b16dbd96f4112d4f919a18e50c38ba6ca8b7e62cfab7eca156c559900a482a00000000
08369d53a773250d92e976b675d73c8982327494bed5292800134714ad636a69

Wait a bit and check to see the SYS has been moved to asset SYSX
> listassetallocations 0 0 '{"asset_guid":1045909988,"addresses":[{"address":"sys1qssw73wzjutn607qws02d4qpsv9vlln4mn7mgu3"}]}'
[
  {
    "asset_allocation": "1045909988-sys1qssw73wzjutn607qws02d4qpsv9vlln4mn7mgu3",
    "asset_guid": 1045909988,
    "symbol": "SYSX",
    "address": "sys1qssw73wzjutn607qws02d4qpsv9vlln4mn7mgu3",
    "balance": 500.00000000,
    "balance_zdag": 500.00000000
  }
]

> listassetallocations 1045909988 sys1qssw73wzjutn607qws02d4qpsv9vlln4mn7mgu3
{
  "amount": 500.00000000
}

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

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

2. SYSX to SYSX on Ethereum

Burn the allocation to go across the bridge to the Ethereum World!
This step has a user-friendly interface on bridge.syscoin.org. Follow the steps on bridge.syscoin.org for SYS->ETH

By the end of the SYS->ETH process on bridge.syscoin.org, 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 on Ethereum back to SYSX

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

At the end of ETH->SYS process on bridge.syscoin.org 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 to Syscoin

Burn the allocation to mint as Syscoin.

$ syscoin-cli assetallocationburn 1045909988 tsys1qv06697ufm23e7g20dzljqm7g8nfuwe0zwt3lhc 500 ""
{
  "hex": "0074000001564c5350e2d64ce9c6a251498a1a5ada7431e1f025b499ae469f2c976d00e51e01000000160014d85b28dce2f359bd0947ac56126e38df5f3afa19feffffff0300ca9a3b00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa1900000000000000002c6a2ae451573e0014d85b28dce2f359bd0947ac56126e38df5f3afa190100046275726e00ca9a3b0000000000508fe49a00000000160014d85b28dce2f359bd0947ac56126e38df5f3afa1900000000"
}

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

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

$ syscoin-cli assetallocationbalance 1045909988 sys1qmpdj3h8z7dvm6z2843tpym3cma0n47setat97g
{
  "amount": 10.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 2 months ago

Syscoin-Ethereum Bridge


Suggested Edits are limited on API Reference Pages

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