Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Processing InstantDEX swap on barterDEX

Saddam Hossain edited this page Dec 1, 2017 · 4 revisions

InstantDEX SWAP

Fastest swaps are here now as InstantDEX Swap. All nodes can be doing this at the same time, any bob to any alice. All you need to have is some amount of KMD deposit for dynamic trust. It does require a deposit that matches your trade size.

Trades were done in as low as 5 seconds. It took only 5 seconds to complete using native coin wallets! Using electrum nodes may take about 20 seconds.

The deposit just has to cover the amount you have pending in swaps, not anything regarding your total amount. If you are selling 10 at at time, deposit 10. If you are selling 50 at a time, deposit 50. And, you can trade without any deposit if you want to wait for coin confirmations. Use InstantDEX swap, just wait for deposit coin confirmations, you can sell all.

Minimum 10 KMD to maximum up to KMD circulation. You can see your balance using the regular balance API. After verification your zcredits will be displayed with your KMD balance like this {"result":"success","coin":"KMD","address":"RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ","balance":363.94840658,"zcredits":50}.

instantdex_deposit

You can deposit KMD using the following script into b addresses which will accure interest as well. This will allow you to do InstantDEX swaps which finishes a swap within 5-20 seconds. The more KMD you deposit for InstantDEX trading, the more limit you can have.

It is a timelocked deposit, keeps the honest traders honest. Gives other traders the assurance that you have a valid deposit to cover any hack attempt.

instantdex_deposit the values are 1 to 52 weeks and the amount (minimum of 10). These figures are calibrated to the 5% APR, ie. 1 weeks interest is approx the BOTS 0.1% fee, 52 weeks is the most the 5% APR accrues, 10 KMD is min required for interest.

It can take few minutes (about 10 confirmations) for the LP nodes to recognize you. This creates a dynamic trust between nodes and swaps are faster. No more failed swaps, they are instant. Just issue normal buy and the LP nodes will respond with InstantDEX swaps.

Sample script:

curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"instantdex_deposit\",\"weeks\":1,\"amount\":10.0,\"broadcast\":1}"

weeks:1 means it will be there for 300 hours or 1 week time. Don't set to week:0 unless you are only testing.

Sample Output:

{"rawtx":"01000000014c9758944771d62c731f9b06246ccd3301ea0e198a6bdbdcb22csdffasdc7010fgdfg00ffffffff0300ca9asdf17a914d9da8esdfsfbe957273f842617132c361546e7b8743420f00000000001976a91492816449164623c4e744009923356ff4832ba388ac998e6d07000000001976a9140c1007fc1f406a0a519886c0e59327e9c43a634088ac2b08175a","hex":"01000000014c9758944771d62c731f9b06246ccd3301ea0e1123jdsfbdcb22ce18d5daf0dc7010000006a473044022044b87624341cb4c01cdce88b592fadcf725d3e88315c2cd35a8d6a66d81ea035022047f372108e264634d610227e9c8ba69399e1609f7a37af1470b47ce6d0bde3b4012103fe754763c176e1339a3f62ee6b9484720e17ee4646b65a119e9f6370c7004abcffffffff0300ca9a3b0000000017a914d9da8e493573be957273f842617132c361546e7b8743420f00000000001976a914928104f862284623c4e744009923356ff4832ba388ac998e6d07000000001976a9140c1007fc1f406a0a519886c0e59327e9c43a634088ac2b08175a",
"tx":{"version":1,
"locktime":1511458859,
"vin":[{"txid":"c70daf5d8de12cb2dcdb6b8a190eea0133cd6c24069b1f732cd671479458974c",
"vout":1,
"scriptPubKey":{"hex":"76a9140c1007fc1f406a0a519886c0e59327e9c43a634088ac"}}],
"vout":[{"satoshis":"1000000000",
"scriptPubKey":{"hex":"a914d9da8e493573be957273f842617132c361546e7b87"}}, {"satoshis":"1000003","scriptPubKey":{"hex":"76a914928104f862284623c4e744009923356ff4832ba388ac"}}, {"satoshis":"124620441","scriptPubKey":{"hex":"76a9140c1007fc1f406a0a519886c0e59327e9c43a634088ac"}}]},
"txid":"a01b85233259e62edcaf3c171c97de0d2977ce88ae172b9b11809da9757e218c",
"complete":true,
"address":"bYbB9P5XG5j1Jr5nbD2nL5jt54WwPEzADd",
"expiration":1512201600,
"deposit":10,
"result":"success",
"broadcast":"a01b85233259e62edcaf3c171c97de0d2977ce88ae172b9b11809da9757e218c"}

claim

After the deposit is expired, you can claim at any time, though it is rounded up to the next week boundary. You need to use ./claim API to claim your InstantDEX deposit (zcredits) back. If you use week:0 you need to save the details of timestamp and the b address that the funds were sent in order to use with the ./claim script to claim it back. If you use more than 1 week, your funds will be automatically be sent back to your wallet within 24 hours of claim.

Minutes or hours is not long enough. Remember, the point here is to resolve any blockchain attacks.

claim API will display the balance of the txid listed in DB/instantdex.json along with interest.

Sample File Contents:

curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"instantdex_claim\"}"

Output:

{
  "result": "success",
  "claimed": 0,
  "txids": [
    {
      "txid": "0604d11bad3ce44c5070c3d11dfc966b8a76be23b9526dcc072bc191db1707a8",
      "deposit": 10,
      "interest": 0.0100111,
      "waittime": 22325065
    },
    {
      "txid": "a3e5227235f9a45f74adca44aa3b2082b65ebacef9e20958f4b46ff49adf5b71",
      "deposit": 10,
      "interest": 0.01001775,
      "waittime": 485065
    },
    {
      "txid": "a01b85233259e62edcaf3c171c97de0d2977ce88ae172b9b11809da9757e218c",
      "deposit": 10,
      "interest": 0.01093925,
      "waittime": 48264
    },
    {
      "txid": "425f98b0763dffb6cb4c41dca18db8b89a9987502802443dde077c6c1f8b073c",
      "deposit": 10,
      "interest": 0.0100149,
      "waittime": 921864
    },
    {
      "txid": "356e8ab78c4bd47e0566cfc578e5b7b3a93ab446aab7bcd72502278a9f7c417f",
      "deposit": 10,
      "interest": 0.010013,
      "waittime": 1358664
    },
    {
      "txid": "0604d11bad3ce44c5070c3d11dfc966b8a76be23b9526dcc072bc191db1707a8",
      "deposit": 10,
      "interest": 0.0100111,
      "waittime": 22325064
    }
  ]
}

Here is a complete ZEROCONF SWAP log of REVS/KMD which took ~37 seconds to complete:

LP_autobuy REVS/KMD price 1.50000000 vol 0.01000000 nonce 0
couldnt find just added f0b9468d8c5b94f32c2ae8eae8a4ddab8558dcffe491fbb404e25a7acd4fe928/2 ht.573843 0.04872214
added 76 from listunspents
set inuse until 1511470341 lag.120 for 830cc2a872a8b84bf28d1c2ad5eb20fca7983aeb071608f51cc00fe8148ff93a/v1
set inuse until 1511470341 lag.120 for 9e4804a0f4ad9576cee9f15b32e0b38b3da9140e3371982a2871113663b4fe3e/v1
QUERY.({"gui":"nogui","aliceid":"901740294957826049","tradeid":3408747491,"base":"REVS","rel":"KMD","timestamp":1511470221,"txfee":"10000","satoshis":"680019","desthash":"f7e6887e591ee9a953f3023dda2b4a1a498e94e42538bfd7da0fc304dec70650","destaddr":"RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ","desttxid":"830cc2a872a8b84bf28d1c2ad5eb20fca7983aeb071608f51cc00fe8148ff93a","destvout":1,"feetxid":"9e4804a0f4ad9576cee9f15b32e0b38b3da9140e3371982a2871113663b4fe3e","feevout":1,"desttxfee":"10000","destsatoshis":"990000","price":1.47757004,"pubkey":"0000000000000000000000000000000000000000000000000000000000000000","method":"request"})
LP_trade REVS/KMD 0.00680019 vol 0.00990000 dest.(0000000000000000000000000000000000000000000000000000000000000000) maxprice 1.50150000
(3730115985 1063960023)      request aliceid.    901740294957826049  REVS/KMD     0.00680019 ->   0.00990000 price   1.45584168 | RT.4 1330
(2800244315 4010512686)     reserved aliceid.    901740294957826049  REVS/KMD     0.00883148 ->   0.00990000 price   1.12098991 | RT.4 1330
alice f7e6887e591ee9a953f3023dda2b4a1a498e94e42538bfd7da0fc304dec70650 received RESERVED.({"gui":"nogui","aliceid":"901740294957826049","tradeid":3408747491,"base":"REVS","rel":"KMD","address":"RQzkkncY8ehpRg8M4kvKmDMcbFxcJvohgk","timestamp":1511470221,"txid":"cb5e58cbfd8a02ac0e2318a7cebc3c7a271eb88a69b0f5aa3eebb5a6a45c36f7","vout":0,"srchash":"30eb3d952f66eba2df0100b97d6707257cf91dc8c8b0237cfb7c3aa70dc52d4d","txfee":"10000","quotetime":1511470221,"satoshis":"883148","desthash":"f7e6887e591ee9a953f3023dda2b4a1a498e94e42538bfd7da0fc304dec70650","txid2":"a785a41ba68693a73e6e8a9878ec7f6b141bc37dc91c768686650c01a803669b","vout2":1,"destaddr":"RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ","desttxid":"830cc2a872a8b84bf28d1c2ad5eb20fca7983aeb071608f51cc00fe8148ff93a","destvout":1,"feetxid":"9e4804a0f4ad9576cee9f15b32e0b38b3da9140e3371982a2871113663b4fe3e","feevout":1,"desttxfee":"10000","destsatoshis":"990000","price":1.13382840,"requestid":3730115985,"quoteid":1063960023,"quotetime":1511470221,"pending":1511470821,"method2":"reserved","method":"reserved"})
LP_calc_magic maxn.1432 <- 1605   | millis 318.532 ave 51.257, aveiters 256.3
updated cb5e58cbfd8a02ac0e2318a7cebc3c7a271eb88a69b0f5aa3eebb5a6a45c36f7/v0 REVS/KMD 883148 price 1.13382840
>>>>>>>>>> received quote REVS/KMD 1.13382840
>>>>>>>>>> found REVS/KMD 1.13382840
send CONNECT
QUERY.({"gui":"nogui","aliceid":"901740294957826049","tradeid":3408747491,"base":"REVS","rel":"KMD","address":"RQzkkncY8ehpRg8M4kvKmDMcbFxcJvohgk","timestamp":1511470221,"txid":"cb5e58cbfd8a02ac0e2318a7cebc3c7a271eb88a69b0f5aa3eebb5a6a45c36f7","vout":0,"srchash":"30eb3d952f66eba2df0100b97d6707257cf91dc8c8b0237cfb7c3aa70dc52d4d","txfee":"10000","quotetime":1511470221,"satoshis":"883148","desthash":"f7e6887e591ee9a953f3023dda2b4a1a498e94e42538bfd7da0fc304dec70650","txid2":"a785a41ba68693a73e6e8a9878ec7f6b141bc37dc91c768686650c01a803669b","vout2":1,"destaddr":"RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ","desttxid":"830cc2a872a8b84bf28d1c2ad5eb20fca7983aeb071608f51cc00fe8148ff93a","destvout":1,"feetxid":"9e4804a0f4ad9576cee9f15b32e0b38b3da9140e3371982a2871113663b4fe3e","feevout":1,"desttxfee":"10000","destsatoshis":"990000","price":1.13382840,"requestid":3730115985,"quoteid":1063960023,"pubkey":"30eb3d952f66eba2df0100b97d6707257cf91dc8c8b0237cfb7c3aa70dc52d4d","method":"connect"})
(4182440362 3799056620)     reserved aliceid.    901740294957826049  REVS/KMD     0.03431599 ->   0.00990000 price   0.28849525 | RT.4 1330
(3955438253 2819035217)     reserved aliceid.    901740294957826049  REVS/KMD     0.00750439 ->   0.00990000 price   1.31922781 | RT.4 1330
LP_calc_magic maxn.1605 <- 1830   | millis 431.065 ave 50.979, aveiters 255.3
(2479297763 3489871391)     reserved aliceid.    901740294957826049  REVS/KMD     0.00745987 ->   0.00990000 price   1.32710087 | RT.4 1330
(2800244315 4010512686)      connect aliceid.    901740294957826049  REVS/KMD     0.00883148 ->   0.00990000 price   1.12098991 | RT.4 1330
(1369623219  308734031)     reserved aliceid.    901740294957826049  REVS/KMD     0.00727641 ->   0.00990000 price   1.36056105 | RT.4 1330
(2800244315  669365273)    connected aliceid.    901740294957826049  REVS/KMD     0.00883148 ->   0.00990000 price   1.12098991 | RT.4 1330
CONNECTED.({"gui":"nogui","aliceid":"901740294957826049","tradeid":3408747491,"base":"REVS","rel":"KMD","address":"RQzkkncY8ehpRg8M4kvKmDMcbFxcJvohgk","timestamp":1511470221,"txid":"cb5e58cbfd8a02ac0e2318a7cebc3c7a271eb88a69b0f5aa3eebb5a6a45c36f7","vout":0,"srchash":"30eb3d952f66eba2df0100b97d6707257cf91dc8c8b0237cfb7c3aa70dc52d4d","txfee":"10000","quotetime":1511470234,"satoshis":"883148","desthash":"f7e6887e591ee9a953f3023dda2b4a1a498e94e42538bfd7da0fc304dec70650","txid2":"a785a41ba68693a73e6e8a9878ec7f6b141bc37dc91c768686650c01a803669b","vout2":1,"destaddr":"RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ","desttxid":"830cc2a872a8b84bf28d1c2ad5eb20fca7983aeb071608f51cc00fe8148ff93a","destvout":1,"feetxid":"9e4804a0f4ad9576cee9f15b32e0b38b3da9140e3371982a2871113663b4fe3e","feevout":1,"desttxfee":"10000","destsatoshis":"990000","price":1.13382840,"requestid":2800244315,"quoteid":669365273,"pair":"tcp://5.9.253.196:38545","method2":"connected","method":"connected"}) numpending.0 tradeid.3408747491 requestid.2800244315 quoteid.669365273
calculated requestid.2800244315 quoteid.669365273
strict compare failure
REVS/KMD bid 1.50150000 ask 0.00000000 values 0.00000000 0.00000000
LP_swapinit request.2800244315 iambob.0 (REVS/KMD) quoteid.669365273
n.1002 m.1000 len.16000 numpubs.1000
>>>>>>>>>> jumblrflag.-2 <<<<<<<<< r.2800244315 q.669365273, 0.00873148 bobconfs.0, 0.00980000 aliceconfs.0 taddr.0 0
set coin.REVS RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> otherfee
otherfee spendlen.25 RThtXup6Zo7LZAi8kRWgjAyi1s4u6U9Cpf <- 0.00010000
set coin.KMD RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> myfee
myfee spendlen.25 RThtXup6Zo7LZAi8kRWgjAyi1s4u6U9Cpf <- 0.00010000
set coin.REVS RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> bobdeposit
bobdeposit vouttype.4 destaddr.()
set coin.REVS RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> bobrefund
bobrefund vouttype.1 destaddr.()
set coin.REVS RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> aliceclaim
aliceclaim spendlen.25 RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ <- 0.00982291
set coin.REVS RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> bobpayment
bobpayment vouttype.3 destaddr.()
set coin.REVS RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> alicespend
alicespend spendlen.25 RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ <- 0.00873148
set coin.REVS RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> bobreclaim
bobreclaim vouttype.1 destaddr.()
set coin.KMD RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> alicepayment
alicepayment vouttype.2 destaddr.()
set coin.KMD RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> bobspend
bobspend vouttype.1 destaddr.()
set coin.KMD RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ -> alicereclaim
alicereclaim spendlen.25 RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ <- 0.00980000
IAMBOB.0 cb5e58cbfd8a02ac0e2318a7cebc3c7a271eb88a69b0f5aa3eebb5a6a45c36f7 a785a41ba68693a73e6e8a9878ec7f6b141bc37dc91c768686650c01a803669b 9e4804a0f4ad9576cee9f15b32e0b38b3da9140e3371982a2871113663b4fe3e [REVS KMD]
alice pairstr.(tcp://5.9.253.196:38545) pairsock.36
start swap iamalice pair.36
connected result.({"gui":"nogui","aliceid":"901740294957826049","tradeid":3408747491,"base":"REVS","rel":"KMD","address":"RQzkkncY8ehpRg8M4kvKmDMcbFxcJvohgk","timestamp":1511470221,"txid":"cb5e58cbfd8a02ac0e2318a7cebc3c7a271eb88a69b0f5aa3eebb5a6a45c36f7","vout":0,"srchash":"30eb3d952f66eba2df0100b97d6707257cf91dc8c8b0237cfb7c3aa70dc52d4d","txfee":"10000","quotetime":1511470234,"satoshis":"883148","desthash":"f7e6887e591ee9a953f3023dda2b4a1a498e94e42538bfd7da0fc304dec70650","txid2":"a785a41ba68693a73e6e8a9878ec7f6b141bc37dc91c768686650c01a803669b","vout2":1,"destaddr":"RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ","desttxid":"830cc2a872a8b84bf28d1c2ad5eb20fca7983aeb071608f51cc00fe8148ff93a","destvout":1,"feetxid":"9e4804a0f4ad9576cee9f15b32e0b38b3da9140e3371982a2871113663b4fe3e","feevout":1,"desttxfee":"10000","destsatoshis":"990000","price":1.13382840,"requestid":2800244315,"quoteid":669365273,"result":"success"})
send >>>>>>>>> r.2800244315 q.669365273 datalen.16046
Otherside trusts us, adjust required confirms to: alice.0 bob.0
NUMCONFIRMS for SWAP alice.0 bob.0, otheristrusted.1 othertrusts.1
SEND pubA0/1 0e5c186d84ce7554673ce7bdf23731930e595e1b02a7e3b1943f5b7a105ec221
CUT VERIFIED
vout.0 0.00990000 -> total 0.01000000
couldnt find just added f0b9468d8c5b94f32c2ae8eae8a4ddab8558dcffe491fbb404e25a7acd4fe928/2 ht.573843 0.04872214
added 76 from listunspents
dustcombine.2 numpre.3 min0.0x7fc0905e3a60 min1.0x7fc0905e40c0 numutxos.64 amount 0.01000000
preselected[0]: 830cc2a872a8b84bf28d1c2ad5eb20fca7983aeb071608f51cc00fe8148ff93a/v1 0.01086805
preselected[1]: a7961044d449c75394dc9b4fad57efcba10c6029f549128b90e0623114602255/v1 0.00457874
numunspents.64 vini.0 value 0.00457874, total 0.00457874 remains 0.00542126 interest 0.00000000 sum 0.00000000 a7961044d449c75394dc9b4fad57efcba10c6029f549128b90e0623114602255/v1
set inuse until 1511470845 lag.600 for a7961044d449c75394dc9b4fad57efcba10c6029f549128b90e0623114602255/v1
preselected[2]: 2e09e927c670109b6ec0b5a31669b7be7873605bbcf5d3b4269b924aad030d17/v1 0.00545400
numunspents.64 vini.1 value 0.00545400, total 0.01003274 remains -0.00003274 interest 0.00000000 sum 0.00000000 2e09e927c670109b6ec0b5a31669b7be7873605bbcf5d3b4269b924aad030d17/v1
set inuse until 1511470845 lag.600 for 2e09e927c670109b6ec0b5a31669b7be7873605bbcf5d3b4269b924aad030d17/v1
change 0.00000000 = total 0.01003274 - amount 0.01000000, adjust 0.00003274 numvouts.1
LP_withdraw {"utxotxid":"830cc2a872a8b84bf28d1c2ad5eb20fca7983aeb071608f51cc00fe8148ff93a","utxovout":1,"locktime":0,"txfee":"10000","outputs":[{"bT4ZsRvS345urqEQizKB4yULPVFQS2ef5D":0.00990000}]} -> 60065ef9b157f1ce8a16d215d87752a09308df0abea67ea8e6581810ce8556ce
0100000002552260143162e0908b1249f529600ca1cbef57ad4f9bdc9453c749d4441096a7010000006a473044022019280342efb8b8536f8d06ca7b3ae4587ec2b296a5ce9e7f6b21b796ab74f8ca02200994071439b9124bb2def7b6ad62a1e8e90cae09d86fa319fab7de9f7b35748a012103fe754763c176e1339a3f62ee6b9484720e17ee4646b65a119e9f6370c7004abcffffffff170d03ad4a929b26b4d3f5bc5b607378beb76916a3b5c06e9b1070c627e9092e010000006b483045022100e29857fa77a6f3c3c00b72b3b4b6a2bd164ccebb3d67c956275fa82957c00f09022051c7e3780564ba04305045d5f27ccb1229865b574199b1c8d3d54f7c44f6213b012103fe754763c176e1339a3f62ee6b9484720e17ee4646b65a119e9f6370c7004abcffffffff01fa270f000000000017a9149d38007e89f309c8f559cca94dac3f2160c275b4879c31175a ALICE PAYMENT created.(bT4ZsRvS345urqEQizKB4yULPVFQS2ef5D)
KMD generate fee 0.00010000 from.RANyPgfZZLhSjQB9jrzztSw66zMMYDZuxQ
vout.0 0.00010000 -> total 0.00020000
couldnt find just added f0b9468d8c5b94f32c2ae8eae8a4ddab8558dcffe491fbb404e25a7acd4fe928/2 ht.573843 0.04872214
added 76 from listunspents
dustcombine.2 numpre.2 min0.0x7fc0905de8c0 min1.(nil) numutxos.64 amount 0.00020000
preselected[0]: 9e4804a0f4ad9576cee9f15b32e0b38b3da9140e3371982a2871113663b4fe3e/v1 0.00104595
preselected[1]: ea7b8bdf9bfab75847b037347063aee2dc383dff355cf27f380e926bb345dbdb/v1 0.00920000
numunspents.64 vini.0 value 0.00920000, total 0.00920000 remains -0.00900000 interest 0.00000000 sum 0.00000000 ea7b8bdf9bfab75847b037347063aee2dc383dff355cf27f380e926bb345dbdb/v1
set inuse until 1511470845 lag.600 for ea7b8bdf9bfab75847b037347063aee2dc383dff355cf27f380e926bb345dbdb/v1
change 0.00900000 = total 0.00920000 - amount 0.00020000, adjust 0.00000000 numvouts.1
LP_withdraw {"utxotxid":"9e4804a0f4ad9576cee9f15b32e0b38b3da9140e3371982a2871113663b4fe3e","utxovout":1,"locktime":1511470244,"txfee":"10000","outputs":[{"RThtXup6Zo7LZAi8kRWgjAyi1s4u6U9Cpf":0.00010000}]} -> a0550b906e0c09c6c8ce45ab0a5be94d13ce2d935a918d882d0768375e2f00ed
rawtxsend KMD 0.00010000
0100000001dbdb45b36b920e387ff25c35ff3d38dce2ae63703437b04758b7fa9bdf8b7bea010000006a4730440220064377127cf633bef948d83e571f5b07f9d8ee9a85b842bbd55a3f1ef866c167022071bf9d9ea162dbfa0d4b7b8c06dd4197582ddbe631a0db9f7d5decfc2a8f4beb012103fe754763c176e1339a3f62ee6b9484720e17ee4646b65a119e9f6370c7004abcffffffff0210270000000000001976a914ca1e04745e8ca0c60d8c5881531d51bec470743f88aca0bb0d00000000001976a9140c1007fc1f406a0a519886c0e59327e9c43a634088aca434175a <- fee state.40
fee sent
rawtx.bobdeposit txid db9ed4f0a588023506794d7b7f9cf9fac7e6760d3d50b4f56008dc104a7b72a2
txfee allocation from value 0.00992291 identical to satoshis: 0.00982291 txfee 0.00010000
utxo 0.00992291, destamount 0.00982291 change 0.00000000 txfee 0.00010000
basilisk_swap_bobtxspend bobdeposit -> 82da17988e507efcb760acc9762419439047416ab1dcd1316b3e8ee84e2ab18a
010000000180ef2d70bc1e96afc224fac24600c7d06f4504176587f924fa4b7e34bacd916a010000006a473044022056358c9e33effa36fa5d02449f5f823d8370ebd3955d0a2576b43899a19f77dd022038e4c5d56dea0caa4fc0311ca0fd8d95b6ffe672b9fd52341929d46f23f4944c0121034464397e3e64a9a1e05bf41c2bcf53a3e34972a7c25b6f89b890ea66c90f16b9ffffffff0223240f000000000017a9149d3b295cdfec4badee172559d3e10043de60030e872a520100000000001976a914ac6637f97ab212cd65c1f0cb8c6d23c61731bf5188ac8a71175a <- bobdeposit
0100000001a2727b4a10dc0860f5b4503d0d76e6c7faf99c7f7b4d7906350288a5f0d49edb00000000b247304402203df4b8832d60fbc09168eb23cb8b3e6beaef2caeaa1c1bbe00dbccb81a558729022048fb6998b4dc1058a9e2d22a17d2b3057c8c3fe54d136438ff797d9bae7c9e0901514c6763048a71175ab17521020e5c186d84ce7554673ce7bdf23731930e595e1b02a7e3b1943f5b7a105ec221ac67a914e4e8ae911ee779dd9c5d08e26969984d6357061a88210363fbabf79d19fe933f9da718f42bb6ea172782ab35d5907fc041d2da05789ab4ac68ffffffff0113fd0e00000000001976a9140c1007fc1f406a0a519886c0e59327e9c43a634088ac00000000 <- aliceclaim
rawtx.bobpayment txid b74d5ebef875eca10a0a6b2e6b7bf330deaf854e1fa0443b5bb970cdff2ce533
reduce satoshis 0.00875647 by txfee 0.00010000 to value 0.00883147
utxo 0.00883147, destamount 0.00875647 change 0.00000000 txfee 0.00010000
basilisk_swap_bobtxspend bobpayment -> 6ce80dbda03b708a0ef1c70bbaa402dafc90e3bde45451ce98891443f107cebd
wait 15600:30 for SWAP.(r2800244315/q669365273) to complete
(1369623219  308734031)     reserved aliceid.    901740294957826049  REVS/KMD     0.00727641 ->   0.00990000 price   1.36056105 | RT.4 1330
alicespend len.34 redeemlen.103 priv0addr.(RQUgFFpayknL7wfQuBhhVqsVBFZru4A6cR) priv0.(0d99eb2200c2deaad67b65fdbea599fe3c21bbc2f760c2444ed1750fb5f3a4f3)
basilisk_swap_bobtxspend alicespend -> 39791155e90181dd7623f19945d97250f8686776b6313285d26c8832610b5477
alicespend.(010000000133e52cffcd70b95b3b44a01f4e85afde30f37b6b2e6b0a0aa1ec75f8be5e4db700000000d347304402200cdcbd3537fc520b613928713ed5b832fa4136fe86a75b2c42b36ebbaf0eceb302201f82ecb29677c1a539e103462ef356c56afb346b651984d86e3c29dc48bf4d8a0120b562f1d67b6cb14dfe9e979bc06a5a604294549b22c823c9ec15ccfab2f280e9004c6763041253175ab17521036e6aa6853c9e30a52009e65025cc9d1a2b98dabb79449c308174302b4631b098ac67a914a056f057a6c0fe8893e9c098240769c65ed45bd38821020e5c186d84ce7554673ce7bdf23731930e595e1b02a7e3b1943f5b7a105ec221ac68ffffffff01bb520d00000000001976a9140c1007fc1f406a0a519886c0e59327e9c43a634088ac00000000)
now 1511470256 before expiration 1511485821
SWAP 2800244315-669365273 finished LP_numfinished.3 !

>>>>>>>>>>>>>>>>>>>>>>>>>
SWAP completed! 2800244315-669365273 {"expiration":1511485821,"tradeid":3408747491,"requestid":2800244315,"quoteid":669365273,"iambob":0,"Bgui":"","Agui":"nogui","gui":"nogui","bob":"REVS","srcamount":0.00873148,"bobtxfee":0.00010000,"alice":"KMD","destamount":0.00980000,"alicetxfee":0.00010000,"aliceid":"901740294957826049","sentflags":["alicespend", "bobpayment", "alicepayment", "bobdeposit", "myfee"],"values":[0.00873147, 0, 0.00883148, 0.00990000, 0.00992291, 0, 0.00010000, 0, 0, 0, 0],"result":"success","status":"finished","finishtime":0,"bobdeposit":"db9ed4f0a588023506794d7b7f9cf9fac7e6760d3d50b4f56008dc104a7b72a2","alicepayment":"60065ef9b157f1ce8a16d215d87752a09308df0abea67ea8e6581810ce8556ce","bobpayment":"b74d5ebef875eca10a0a6b2e6b7bf330deaf854e1fa0443b5bb970cdff2ce533","paymentspent":"39791155e90181dd7623f19945d97250f8686776b6313285d26c8832610b5477","Apaymentspent":"0000000000000000000000000000000000000000000000000000000000000000","depositspent":"0000000000000000000000000000000000000000000000000000000000000000","method":"tradestatus","finishtime":0,"gui":"nogui"}
second call.({"expiration":1511485821,"tradeid":3408747491,"requestid":2800244315,"quoteid":669365273,"iambob":0,"Bgui":"","Agui":"nogui","gui":"nogui","bob":"REVS","srcamount":0.00873148,"bobtxfee":0.00010000,"alice":"KMD","destamount":0.00980000,"alicetxfee":0.00010000,"aliceid":"901740294957826049","sentflags":["alicespend", "bobpayment", "alicepayment", "bobdeposit", "myfee"],"values":[0.00873147, 0, 0.00883148, 0.00990000, 0.00992291, 0, 0.00010000, 0, 0, 0, 0],"result":"success","status":"finished","finishtime":0,"bobdeposit":"db9ed4f0a588023506794d7b7f9cf9fac7e6760d3d50b4f56008dc104a7b72a2","alicepayment":"60065ef9b157f1ce8a16d215d87752a09308df0abea67ea8e6581810ce8556ce","bobpayment":"b74d5ebef875eca10a0a6b2e6b7bf330deaf854e1fa0443b5bb970cdff2ce533","paymentspent":"39791155e90181dd7623f19945d97250f8686776b6313285d26c8832610b5477","Apaymentspent":"0000000000000000000000000000000000000000000000000000000000000000","depositspent":"0000000000000000000000000000000000000000000000000000000000000000"})
finish swap.0x7fc0ac73ded0
Clone this wiki locally