Skip to content

Convert UT to SUT and vice versa

Teh Sunn Liu (AlexLiu) edited this page Sep 5, 2018 · 2 revisions

Here, you will learn to convert your UT to SUT and SUT back to UT.

Requirements

  • Having control of your private key is crucial while performing 2-way peg. Any mistake can lead to permanent loss of your coins.
  • You'll need a UT wallet properly configured with your private key
  • You'll need a USC node up and running(fully synced), with personal and eth modules enabled in the RPC * interface of your USC configuration file.
  • Last and foremost, you'll need your Ulord address to be whitelisted in USC network. You can do so by sending your Ulord address to the USC team or email at tehsunnliu@ulord.net

How do I Whitelist my address?

Before performing 2-way peg, users are required to whitelist their Ulord address in USC network. This is for security reasons. All you need to do is identify which Ulord address you are going to use to transfer coins to USC. However, make sure that the address you select should be a P2PKH address any other address will result in losing your funds. For testnet, the address starts with a 'u' and for mainnet, the address starts with a 'U'.

Once you have determined which address you are going to use to transfer funds from, you need to send your address to USC team and the amount you wish to transfer from Ulord to USC. You will be notified with an email confirming that your address has been whitelisted.

Once your address has been whitelisted you can now follow the steps below to perform 2-way peg. However, it is important to note that whitelisting works only once. This means that once you have transfered the funds from the whitelisted address you cannot transfer funds again until and unless you whitelist your address again.

Sending money from Ulord to USC

❗IMPORTANT the minimum amount of transfer is 0.01 UT for both Testnet and Mainnet

  1. Send a UT transaction to the Federation's Address, Testnet - "sczAdANFdF7qZZH7YH74SYZ9i6K6H4GjCJ"
  2. Obtain the UT transaction hash ID
  3. Open Ulord Explorer and search for your transaction
  4. You will have to wait a minimum of 100 confirmations plus a minimum of 5 minutes for checking your UT balance.

Checking your SBTC balance

Convert your Ulord private key to USC privateKey using USC-KeyConversionTool (this can be run offline), Execute the following command to import your private key

$ curl -X POST -H "Content-type:application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"eth_getBalance", "params":["<USC Address>"]}' http://<USCNode>:<USCNodePort>

Returning your funds from USC to Ulord

❗IMPORTANT the minimum amount to send is 0.005 sUT for Testnet and 0.008 sUT for Mainnet

  1. Convert the private key to USC format using USC-KeyConversionTool (this can be run offline), you'll obtain a derived USC private key and your USC address
  2. Add your obtained USC private key to your USC node:
$ curl -X POST --data '{"method":"personal_importRawKey", "params":["<USCConvertedPrivateKey>", "<passPhraseToEncryptPrivKey>"], "jsonrpc":"2.0", "id":1}' http://<USCNode>:<USCNodePort>

Unlock your account for transfers:

$ curl -X POST --data '{"method":"personal_unlockAccount", "params":["<USCAddress>", "<passPhraseJustUsedToEncryptPrivKey>", ""], "jsonrpc":"2.0", "id":1}' http://<USCNode>:<USCNodePort>

Transfer your desired amount

$ curl -X POST --data '{"method":"eth_sendTransaction", "params":[{"from": "<USCAddress>", "to": "0x0000000000000000000000000000000001000006", "gasPrice": 183000000, "gas": 100000, "value": <valueToReleaseInWeis>}], "jsonrpc":"2.0", "id":1}' http://<USCNode>:<USCNodePort>

Wait for 4000 USC confirmations for Mainnet and then wait at least 5 more minutes for your funds to arrive to your Ulord address.