Conversation
| }); | ||
| }); | ||
|
|
||
| describe('Exceeding cap', function() { |
There was a problem hiding this comment.
Can't tell if there is a test in this file that buys under the mint cap to check that its still possible to buy even with the mint cap on
There was a problem hiding this comment.
To add to this point, I only see purchasing happening in the before each hook and we don't verify the fei they received. Recommend adding a test purchasing from the bonding curve that actually succeeds. After the success, we should verify FEI balances and that the bonding curve or receiving contract's eth balance incremented.
There was a problem hiding this comment.
There are tests for the FEI being received higher up in the file
| uint256 public override discount; | ||
|
|
||
| /// @notice the cap on how much FEI can be minted by the bonding curve | ||
| uint256 public override mintCap; |
There was a problem hiding this comment.
When we upgrade the contracts, are we doing it with a proxy/storage pattern or some other method?
If we are using a proxy/storage pattern, the variable should be added after BASIS_POINTS_GRANULARITY.
There was a problem hiding this comment.
We don't use proxy/storage its just drop-and-replace
| }); | ||
| }); | ||
|
|
||
| describe('Exceeding cap', function() { |
There was a problem hiding this comment.
To add to this point, I only see purchasing happening in the before each hook and we don't verify the fei they received. Recommend adding a test purchasing from the bonding curve that actually succeeds. After the success, we should verify FEI balances and that the bonding curve or receiving contract's eth balance incremented.
|
keep this PR simple, but maybe an idea for later : you could add these The minted/burnt amount can be tracked by an override of When I was working on the Curve deposit with reweights, I wanted to have this kind of tracking of minted / burnt fei, and implement a kind of |
Adds a cap on the amount of FEI minted by a bonding curve to mitigate the damage from infinite minting attacks and oracle malfunctions