Closed sherlock-admin2 closed 7 months ago
kgothatso
medium
announceLimitOrder
user can call announceLimitOrder with same tokens
user can call announceLimitOrder with same tokens and cancel one order limit cancelLimitOrder
cancelLimitOrder
incorrect calculation for liquidation
https://github.com/sherlock-audit/2023-12-flatmoney/blob/main/flatcoin-v1/src/LimitOrder.sol#L58
https://github.com/sherlock-audit/2023-12-flatmoney/blob/main/flatcoin-v1/src/LimitOrder.sol#L87
Manual Review
check to see if token has been used to make announceLimitOrder if yes then revert
1 comment(s) were left on this issue during the judging contest.
takarez commented:
invalid
Invalid, almost no impact of issue described
kgothatso
medium
user can call
announceLimitOrder
with same tokensSummary
user can call
announceLimitOrder
with same tokensVulnerability Detail
user can call
announceLimitOrder
with same tokens and cancel one order limitcancelLimitOrder
Impact
incorrect calculation for liquidation
Code Snippet
https://github.com/sherlock-audit/2023-12-flatmoney/blob/main/flatcoin-v1/src/LimitOrder.sol#L58
https://github.com/sherlock-audit/2023-12-flatmoney/blob/main/flatcoin-v1/src/LimitOrder.sol#L87
Tool used
Manual Review
Recommendation
check to see if token has been used to make
announceLimitOrder
if yes then revert