Synthetixio / simulation

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

Orderbook cleanup #66

Closed 0xdomrom closed 6 years ago

0xdomrom commented 6 years ago

MERGE AFTER #65

Removed premium/discount from marketplayer sell functions, as it seemed pointless, as when a sell is placed, it should fill completely no matter what...

Added fee calculation in transfer functions as it didn't exist, making the marketplayer transfer functions invalid.

Removed some redundant rounding, added it in some places where it was needed

Began writing tests for transferring and orderbook matching. Needs to be cleaned up to remove repeated code, and better separation of code than comment blocks, but that isn't the point of this PR.