Normal behavior: The constructor of the engine should validate all critical addresses (tokens, price feeds, DSC token) to ensure they are non‑zero and non‑duplicate, preventing deployment misconfiguration.
Issue: The current constructor does not validate these inputs; zero addresses or duplicates can be passed without reverting, leading to permanently broken mappings and collateral accounting.
Likelihood:
Reason 1 // Deployment scripts and environment variables are error‑prone; a single mis‑typed address or copy‑paste error is common.
Reason 2 // Multi‑environment setups (testnets, staging, mainnet) increase the chance of inconsistent or invalid configuration.
Impact:
Impact 1 // Zero addresses for tokens or feeds can cause runtime reverts and unfixable behavior in production, requiring a full redeploy and migration.
Impact 2 // Duplicate token addresses or feed mappings can lead to double‑counting or mis‑routing collateral value, silently breaking risk assumptions.
A misconfigured deployment passes a zero address as a collateral token:
Deployer invokes the constructor with token_addresses[0] = 0x0.
Contract deploys successfully without validation.
Any attempt to deposit or value that collateral will either revert or behave unpredictably.
Since the constructor cannot be called again, the only remedy is a full redeploy.
Add explicit assertions to the constructor for non‑zero and non‑duplicate addresses.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.