Use of delegatecall with arbitrary data can result in destruction of contract and loss of users' funds.
In the function createTradingAccountAndMulticall, the caller can pass in arbitrary bytes[] calldata data which is concatenated with tradingAccountId and then passed to a delegatecall
Since tradingAccountid is predictable, the danger lies with an attacker passing in data which makes up a malicious contract address that contains a selfdestructcall that would destroy the TradingAccountBranch contract.
Also, because other users grant TradingAccountBranch approval for token transfers (during deposits), some users may unwittingly grant unlimited approval limits, a practice which is quite common. An attacker could then abuse the delegatecall to steal tokens from these users.
Critical. TradingAccountBranch contract may be destroyed and other users' funds could be stolen.
Manual Review
Avoid the use of delegatecall if possible or whitelist the function. Otherwise, perform validation on the data param to ensure no malicious calls are being made.
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.