DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: low
Invalid

Functionality will break Due to Hardcoded Paraswap Address

Summary

The ParaSwapUtils library hardcodes the Paraswap contract address, making the system inflexible. If Paraswap changes its contract address (e.g., during upgrades, migrations, or modifications to their system), the functionality will break.

Vulnerability Details

2025-02-gamma/contracts/libraries/ParaSwapUtils.sol at main · CodeHawks-Contests/2025-02-gamma

2025-02-gamma/contracts/libraries/ParaSwapUtils.sol at main · CodeHawks-Contests/2025-02-gamma

The library contains a hardcoded check for the Paraswap address when executing a dex swap for Paraswap:

require(to == address(0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57), "invalid paraswap callee");

Impact

Breaks functionality if Paraswap changes its address.

No flexibility to adapt to future updates and migrations.

Increased risk of the contract becoming obsolete.

Tools Used

Recommendations

Make the Paraswap address configurable.

Updates

Lead Judging Commences

n0kto Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Suppositions

There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.