Closed sherlock-admin closed 1 year ago
n33k
high
Trade transactions are sent by order sender, an account managed by JOJO. The trade transaction gas fees are paid by order sender instead of traders.
For this trading system, high volume tradings are expected which will consume JOJO considerable gas fees.
Order sender pays trading gas fee and the cost will be huge.
https://github.com/sherlock-audit/2023-04-jojo/blob/main/smart-contract-EVM/contracts/impl/Perpetual.sol#L95-L110
Manual Review
Measure gas fee of trade transaction and take the fee from trader.
n33k
high
Order sender pays trade gas fee and the cost will be huge
Summary
Trade transactions are sent by order sender, an account managed by JOJO. The trade transaction gas fees are paid by order sender instead of traders.
Vulnerability Detail
For this trading system, high volume tradings are expected which will consume JOJO considerable gas fees.
Impact
Order sender pays trading gas fee and the cost will be huge.
Code Snippet
https://github.com/sherlock-audit/2023-04-jojo/blob/main/smart-contract-EVM/contracts/impl/Perpetual.sol#L95-L110
Tool used
Manual Review
Recommendation
Measure gas fee of trade transaction and take the fee from trader.