external/
└── market-making/
└── branches/
└── StabilityBranch.sol
Three medium-severity issues were found, concerning front-running risks, gas inefficiencies, and external dependency risks. These may not cause immediate fund loss but could lead to financial manipulation, high gas costs, or system instability.
initiateSwap
Description: The initiateSwap
function is susceptible to front-running attacks, where malicious actors can observe pending transactions and manipulate prices before they are executed.
Code Affected: initiateSwap
.
Description: Functions such as initiateSwap
and fulfillSwap
perform multiple state updates and external calls, which could lead to transactions running out of gas.
Code Affected: initiateSwap
, fulfillSwap
.
Description: The contract depends on external libraries (Vault
, Collateral
, UsdTokenSwapConfig
). If these dependencies are compromised or updated incorrectly, the contract’s security could be impacted.
Code Affected: All external library imports.
Potential front-running exploits leading to manipulated swaps.
Gas inefficiencies causing transaction failures.
Risk of external contract vulnerabilities affecting functionality.
Manual Review: Assessed gas consumption patterns.
Slither: Identified front-running opportunities.
Implement commit-reveal schemes or minimum execution delays to mitigate front-running.
Optimize gas usage by batching state changes and caching storage variables.
Regularly audit external dependencies and verify their integrity.
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.