lindy-labs / opus_contracts

Opus Source Code
https://opus.money
Other
0 stars 0 forks source link

fix: make initial yang amount dynamic to prevent overflow from donations #533

Closed tserg closed 9 months ago

tserg commented 9 months ago

See issue

Change the initial yang amount from 1000 to 10 ** (asset.decimals / 2) so as to mitigate against overflows when calculating the cumulative price in the event of donations.

This required the error margin for tests to be relaxed because of the increase in initial yang amount and their value.