-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
contractsRequires smart contract engineeringRequires smart contract engineering
Description
Deeper look into some issues related to numerical precision. PR #73 fixes some issues where an fixed rate purchase results in the APR going up; however, there are still some minor issues where a trade of size 10e18 results in a higher APR than a trade of size 1e18.
trade size: 10e18
with divDown: 49999999999886067
with divUp: 49999996900228853
delta: 49999999999886067 - 49999996900228853 = 3099657200
trade size: 1e18
with divDown: 50000006551536041
with divUp: 49999975554963707
delta: 50000006551536041 - 49999975554963707 = 30996572304
trade size: 0.1e18
with divDown: 50000057980327600
with divUp: 49999762774876600
delta: 50000057980327600 - 49999762774876600 = 295205451000
trade size: 0.01e18
with divDown: 50000583700909500
with divUp: 49997631646399300
delta: 50000583700909500 - 49997631646399300 = 2952054510208
jalextowle
Metadata
Metadata
Assignees
Labels
contractsRequires smart contract engineeringRequires smart contract engineering