Synthetixio / simulation

Agent-based model of the proposed stablecoin.
24 stars 18 forks source link

Order fee calculation #14

Closed 0xdomrom closed 7 years ago

0xdomrom commented 7 years ago

How it currently seems, is that if a bid/ask is placed, the order's quantity is quantity+fee. If you're looking at a market you would want to know how much is available for you to get, so the order quantity should be how much is available for you to receive, not how much the other "player" used to place the order.

However, placing an order shouldn't charge a fee, only when it is filled, so the order should hold both the quantity and fee values (and charge a percentage of the fee if an order is partially filled - this may need some thought if some sort of flat fee will be charged).

Some object to deal with fees should probably be created, as well as changes to the orders.

0xdomrom commented 7 years ago

completed in #20 but on further use seems issue #13 comes up