Closed sherlock-admin3 closed 4 months ago
The protocol team fixed this issue in the following PRs/commits: https://github.com/0xCedar/elfi-perp-contracts/pull/60
Invalid, limits can be freely adjusted by admins, so no time sensitive DoS (not described in issue) and fund locked for more than a week will occur.
The Lead Senior Watson signed off on the fix.
qpzm
Medium
The OI ratio limit rather prevents from enhancing OI ratio.
Summary
The OI ratio limit rather prevents from enhancing OI ratio.
Vulnerability Detail
The OI ratio limit is in effect only when the smaller side is bigger than
minOpenInterest
. Therefore, it prevents from enhancing the balance of OI ratio when the bigger side is already way bigger thanminOpenInterest
and the smaller side starts to increase overminOpenInterest
.For example, suppose
minOpenInterest
is $1M andmaxLongOpenInterestCap
andmaxShortOpenInterestCap
are $100M.Impact
The OI ratio check rather results in a bad effect in OI ratio.
Code Snippet
https://github.com/sherlock-audit/2024-05-elfi-protocol/blob/7e0cead5273b386ca7a1f754483dc387671a35c1/elfi-perp-contracts/contracts/process/MarketProcess.sol#L141-L160
Tool used
Manual Review
Recommendation
Delete the OI Ratio check.