Multicall functions preverse msg.value over calls, which leads erreneous execution if the payloader intends to deal with different msg.value for each call.
TradingAccountBranch::createTradingAccountAndMulticall
is a multicall function which enable traders to perform several calls in a single transaction by providing the correct data payload. This includes sending ether as seen by the payable
modifier.
The problem is if the payload intends to deal with different amount of eth for each call, the call will be erreneous as msg.value will persist over calls. All the msg.value to be distributed will be thesame.
Area of interest: https://github.com/Cyfrin/2024-07-zaros/blob/69ccf428b745058bea08804b3f3d961d31406ba8/src/perpetuals/branches/TradingAccountBranch.sol#L285-L294
Incorrect accounting.
Manual
Please use solodit for a broader context and alternative approach to the desired action.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.