CounterpartyXCP / counterwallet

Counterparty web wallet
https://counterwallet.io
147 stars 162 forks source link

DEX Rounding - Matching Orders Don't Match #828

Open Jpja opened 6 years ago

Jpja commented 6 years ago

When clicking on the highest bid, the order form is automatically filled with price, amount and total for a matching sell order.

Typically you'll want to change the amount you want to sell, and CW then automatically adjusts the total while the price stays the same.

Usually this works fine but occasionally there's some rounding involved. This results in the orders not matching.

In the below example, the form rounds down the price (from 5.26358654 to 5.26358650 - it's a sell order so this is desired - the orders shall match).

However, after the order is confirmed, the price has increased to 5.26358660 and it won't match the slightly lower buy order.

Note that the corresponding XCP amount has increased - from 15.79075962 to 15.79076000. The TEST.Div5 stays at 3.00000000.

Note also that the bid in My Open Orders and Buy orders are displayed with different prices (5.26358650 vs 5.26358654) while the XCP and TEST.Div5 amounts are the same in both tables.

image

image