makerdao / keg

GNU Affero General Public License v3.0
11 stars 6 forks source link

I am not sure I understand why cage has a parameter without name #15

Closed alexisgayte closed 3 years ago

alexisgayte commented 3 years ago

https://github.com/makerdao/keg/blob/2bdc2cbad01680fa340002987b87a26f1ef9a38b/src/Keg.sol#L216

I didn't even know it was possible. I learned something.

However, I don't understand why cage() has a parameter. It doesn't seem to be used at all in any implementation. And from what I have seen before cage() doesn't have parameter.

hexonaut commented 3 years ago

This is added to maintain the proper function signature when this gets called from the vow, but the amount of dai to return is no longer correct because the FlapTap does not store the dai, so it ignores this param and calculates it itself.