The initialize
function in the GlobalConfigurationBranch
contract sets the tradingAccountToken
and usdToken
addresses. An issue exists where an incorrect tradingAccountToken
address could be initialized, leading to improper functioning of the contract.
Proof of Impact and Vulnerability: Initializing the tradingAccountToken
with an incorrect address can have significant impacts:
Incorrect Token Interactions: The contract may interact with the wrong token, leading to incorrect token transactions.
Malfunction in Trading Operations: It could cause a malfunction in trading operations, resulting in potential loss of user funds.
Security Vulnerabilities: Security vulnerabilities may arise, making the protocol susceptible to exploitation.
Loss of Trust: User and liquidity provider trust in the protocol could diminish, affecting the protocol's reputation and usage.
Example Scenario: If tradingAccountToken
is set to an incorrect address, any function attempting to transfer or interact with this token would fail or behave unexpectedly, potentially resulting in loss of funds. For instance, if a user tries to trade, the contract might not execute the trade correctly, leading to financial losses.
Manual code review
To mitigate this issue, implement a validation check to ensure that the provided tradingAccountToken
address is correct:
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.