porter-finance / v1-core

⛰️ Smart contracts powering the Porter protocol.
https://porter.finance
GNU Affero General Public License v3.0
4 stars 3 forks source link

fix failing test due to rounding #304

Closed RusseII closed 2 years ago

RusseII commented 2 years ago

This fixes the failing test.

This was failing because the maxSupply was a hardcoded 18 decimal number.

Previously, we were paying 400k 10^6 when 50m 10^18 was due (effectively paying ~.0000000000000000001%) which caused redeem to round down to zero when calculating the redeem amount.

image

Note: You make want to improve this test, I only focused on fixing the error

Please merge if you like this :)