Closed code423n4 closed 1 year ago
This is deliberate as stated in the docs under the heading Fee Structure. Thus, I'm marking this issue invalid.
Maverick AMM supports initializing pools with arbitrary fee rates, but it is expected that LPs will choose from one of the following “standard” fee rates:
kirk-baird marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2022-12-Stealth-Project/blob/fc8589d7d8c1d8488fd97ccc46e1ff11c8426ac2/maverick-v1/contracts/models/Factory.sol#L60 https://github.com/code-423n4/2022-12-Stealth-Project/blob/fc8589d7d8c1d8488fd97ccc46e1ff11c8426ac2/maverick-v1/contracts/models/Factory.sol#L82
Vulnerability details
Impact
Pool with any fee tier can be created
Proof of Concept
There is a section in this medium:
https://medium.com/maverick-protocol/maverick-amm-the-revolutionary-amm-that-enables-directional-lping-unlocking-greater-capital-34427f5ac22f
In Fee Structure:
In the implement, the code does not restrict the fee setting:
The user indeed can create any fee tier, and the creator of the pool can set very high pool tier to rug the user.
The pool creator can create a pool with 30% fee or 50% or even 80% or 100% fee.
The user that does not choose the fee setting careful will lose all the trade to the fee.
Tools Used
Manual Review
Recommended Mitigation Steps
We recommend the project limit the pool fee tier setting to
0.01% 0.04% 0.06% 0.10% 0.25% 0.35% 0.50% 1.00% 2.00% 3.00%
just like the code add reasonable upper bound for the protocol fee setting.