Skip to content

Rounding issue when matching orders #342

@abitmore

Description

@abitmore

As @alexpmorris reported in this steemit post, there is an rounding issue when matching orders. For example:

image

The last matched order was selling 0.185 BTS, but apparently it's not enough to get 21 satoshi of HERO, so finally it got 20. However, to get 20 satoshi of HERO, only need to pay 0.1838 BTS.

Current implementation is in favor of the maker (it gets all the amount that below a satoshi of the other token). I propose to change it to in favor of the taker, or anything that is fairer. For example, if the rest is less than a satoshi, cancel the order and return the rest to the taker. I guess it's hard to implement due to the design of price structure. Another side effect is that people may be unable to sell all balance of one token.

Earlier discussion in #338. Probably related: #132, #184.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions