Xud: Trading Test Environment v2

Created on 13 Sep 2018  路  6Comments  路  Source: ExchangeUnion/xud

Continuation of v1:

  • 3 VMs: xud1,2,3 all LND enabled (BTC/LTC), raiden disabled
  • 1 separate VM: running one SIMNET BTCD and one SIMNET LTCD. BTCD serves all BTC-LNDs, LTCD serves all LTC-LNDs of xud1,2,3. There should be a script that mines a new block every 5 seconds.
  • public "requestChannel(LND URI, currency, amount)" method to call at xud1,2,3, (it's a separate script, not part of XUD) which triggers xud1,2,3 to open a channel back to me. Advanced: Automatically open an outgoing channel on the second currency with max capacity. We might only open this for whitelisted xud pubkeys to avoid abuse.
  • continous deployment: xud1,2,3 get updated automatically on latest master: idea -> dockerhub -> kubernetes pull new image, check kubernetes scripts in /test
  • trading bot as a market maker for testing, so I'd say: todays rate, place 10 buy and 10 sell limit orders .0001, quantity 0.01 from each other BTC & LTC. When they are filled, replace them - keep it simple for now.
P1 automated tests

Most helpful comment

For SIMNET there should be one BTCD (or LTCD) running in the cloud. This BTCD serves all BTC-LNDs of all exchanges. There should be a script that mines a new block every few seconds. Do you see any issue with this setup?

requestChannel(LND URI, currency, amount) - I wouldn't add this to XUD itself. Instead, I suggest creating a script/standalone program that monitors the LND's channels and automatically opens an outgoing channel for every incoming channel.
So, for example, if A connects to xud2 and creates a channel to xud2, xud2 will automatically create a channel back to A. This way swap can work in both directions.

You can also consider that A open and fund the channel with push_amt. This moves some of the funds to the xud1,2,3 side. It should work without any problem but it is less of a real life scenario

All 6 comments

For SIMNET there should be one BTCD (or LTCD) running in the cloud. This BTCD serves all BTC-LNDs of all exchanges. There should be a script that mines a new block every few seconds. Do you see any issue with this setup?

requestChannel(LND URI, currency, amount) - I wouldn't add this to XUD itself. Instead, I suggest creating a script/standalone program that monitors the LND's channels and automatically opens an outgoing channel for every incoming channel.
So, for example, if A connects to xud2 and creates a channel to xud2, xud2 will automatically create a channel back to A. This way swap can work in both directions.

You can also consider that A open and fund the channel with push_amt. This moves some of the funds to the xud1,2,3 side. It should work without any problem but it is less of a real life scenario

Do you see any issue with this setup?

Not at all, sound great!, Updated description

Any volunteers to work on that? @michael1011 @itsbalamurali

Closed this one https://github.com/ExchangeUnion/xud/issues/508, you wanna take over? @offerm

@michael1011 and me will work on https://github.com/ExchangeUnion/xud/issues/191 first, can you help us with this one after? @offerm

Update
Continuation of v1:

3 VMs: xud1,2,3 all LND enabled (BTC/LTC), raiden disabled

done

1 separate VM: running one SIMNET BTCD and one SIMNET LTCD. BTCD serves all BTC-LNDs, LTCD serves all LTC-LNDs of xud1,2,3. There should be a script that mines a new block every 5 seconds.

done

public "requestChannel(LND URI, currency, amount)" method to call at xud1,2,3, (it's a separate script, not part of XUD) which triggers xud1,2,3 to open a channel back to me. Advanced: Automatically open an outgoing channel on the second currency with max capacity. We might only open this for whitelisted xud pubkeys to avoid abuse.

in the making by @michael1011

continous deployment: xud1,2,3 get updated automatically on latest master: idea -> dockerhub -> kubernetes pull new image, check kubernetes scripts in /test @itsbalamurali

Working on it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kilrau picture kilrau  路  6Comments

kilrau picture kilrau  路  6Comments

kilrau picture kilrau  路  4Comments

kilrau picture kilrau  路  7Comments

kilrau picture kilrau  路  6Comments