Closed zktony closed 2 years ago
Right now, worker's trade settlement logic is Buyer preferable, which means if following trades are placed:-
place_order(alice, None, btc, usd, 'bid', QUANITY = UNIT, 'limit', PRICE = 2 * UNIT) place_order(bob, None, btc, usd, 'ask', QUANITY = UNIT, 'limit',PRICE = UNIT)
then Execution Price => UNIT
But logic followed by Openfinex is based on FCFS which means if same trades are placed as above:-
then Execution Price => 2 * UNIT
Or if orders are in opposite order i.e.
place_order(bob, None, btc, usd, 'ask', QUANITY = UNIT, 'limit',PRICE = UNIT) place_order(alice, None, btc, usd, 'bid', QUANITY = UNIT, 'limit', PRICE = 2 * UNIT)
As discussed with @visiondream3, I am going to update our logic to one which OF uses, i.e. FCFS
CC @Gauthamastro @simonsso
Right now, worker's trade settlement logic is Buyer preferable, which means if following trades are placed:-
then Execution Price => UNIT
But logic followed by Openfinex is based on FCFS which means if same trades are placed as above:-
then Execution Price => 2 * UNIT
Or if orders are in opposite order i.e.
then Execution Price => UNIT
As discussed with @visiondream3, I am going to update our logic to one which OF uses, i.e. FCFS
CC @Gauthamastro @simonsso