You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lockNgt and freeNgt minor optimization - I think as long as mkrNgtRate is larger than 2 then "wad-overflow" can never happen for these. We should consider adding that check to the constructor and moving the check to only lock and free.
The text was updated successfully, but these errors were encountered:
oldchili
changed the title
"wad-overflow" not likely for lockNgt and freeNgt
(3) "wad-overflow" not likely for lockNgt and freeNgt
Jan 8, 2024
echo "(2^256-1) / 3 < 2^255-1" | bc
1
echo "(2^256-1) / 2 < 2^255-1" | bc
0
If the rate of NGT/MKR is >= 3 then it is safe to remove the require for NGT. However not sure if I feel comfortable leaving that to a variable that comes from an external contract. The only exception would be if we put a require in the constructor to verify that.
echo "(2^256-1) / 3 < 2^255-1" | bc
1
echo "(2^256-1) / 2 < 2^255-1" | bc
0
If the rate of NGT/MKR is >= 3 then it is safe to remove the require for NGT. However not sure if I feel comfortable leaving that to a variable that comes from an external contract. The only exception would be if we put a require in the constructor to verify that.
Yes, was thinking of a constructor check as well.
Not super critical, so feel free to ignore this issue.
lockNgt and freeNgt minor optimization - I think as long as mkrNgtRate is larger than 2 then "wad-overflow" can never happen for these. We should consider adding that check to the constructor and moving the check to only lock and free.
The text was updated successfully, but these errors were encountered: