Proud Rusty Mantis
Medium
Upon minting and swapping nuAssets
, we have the following modifier which disallows the aforementioned actions:
modifier notInWarningCF() {
...
}
The issue is that the modifier should not actually be applied when swapping as this doesn't decrease the CF.
- User tries to mint
nuAssets
when the CF is in a warning state - As the
CF
will decrease, this correctly reverts (due to thenuAsset
supply increasing while therETH
balance staying stationary) - User wants to swap between
nuAssets
when the CF is in a warning state - This will incorrectly revert despite the user not worsening the CF and even improving it (due to round downs)
Swapping is impossible when the CF is in a warning state even though it shouldn't be
Remove the modifier from the swapping functions