Open oldchili opened 7 months ago
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.
Let's leave it open for now and we can take a decision later.
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.