particle4dev / dicoapp-e

SPV lightweight GUI wallet with barterDEX swap capabilities
MIT License
1 stars 11 forks source link

Peg orderbook prices to a specific public key #73

Closed siulynot closed 6 years ago

siulynot commented 6 years ago

Currently: Orderbook right now autoselects the lowest price printed in the orderbook, indifferent from which server or what price is being printed. Right now, if someone sets an order with a price much lower than current prices on a server with empty wallets, it can render the dicoapp unusable.

Expected: In the original dicoapp there was a parameter that could set a specific pubkey of a server to pull prices from. That way, price front running is blocked.

STEPS TO REPRODUCE: In the original app there was a file like this:

~/dicoapp/imports/api/config$ cat tokenconfig.js let tokenconfig = { dICOtoken: { name: 'GLX Token', shortcode: 'GLXT', siteurl: 'https://glx.co', supporturl: 'https://glx.co', pricebob: 'b30ab074d57e2aa0f639ae9bc5965792ceb6270c64561a612e421c43b2a4fd13', netid: 0, seed: '0.0.0.0' } };

Pricebob parameter would read prices only from one pubkey. If the parameter was set to 0 it would be null and just read the first price printed in the orderbook.

particle4dev commented 6 years ago

Moved it here: https://github.com/KomodoPlatform/dicoapp-e/issues/3