Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: low
Invalid

Opposition of NatSpec

## Summary
​
Opposition of NatSpec in `UniswapV3Adapter::setPoolFee`
​
## Vulnerability Details
​
The NatSpec of the function `UniswapV3Adapter::setPoolFee` says "@dev the minimum is 1000 (e.g. 0.1%)" but the logic of the
function allows the deposit of `500` which is lower than `1000`.
​
## Impact
​
The pool charge lesser fee than required.
​
## Recommendations
​
Add the check below to the logic of `UniswapV3Adapter::setPoolFee`.
​
```diff
function setPoolFee(uint24 newFee) public onlyOwner {
// revert if the new fee is not 500, 3000 or 10_000
- if (newFee != 500 && newFee != 3000 && newFee != 10_000) revert Errors.InvalidPoolFee();
​
+ if(newFee < 1000 || newFee > 10_000) {
+ revert Errors.InvalidPoolFee();
+ }
​
// set the new fee
feeBps = newFee;
​
// emit the event
emit LogSetPoolFee(newFee);
}
```
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!