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

Unnecessary ABIEncoderV2 Pragma [Outdated Code]

Summary

The contract uses the deprecated pragma abicoder v2 directive which is unnecessary in recent Solidity versions.

Vulnerability Details

PerpetualVault, VaultReader:

pragma solidity ^0.8.4;
pragma abicoder v2; // Unnecessary pragma

Since Solidity 0.8.0, ABIEncoderV2 is enabled by default and the pragma is no longer needed.

Impact

  • Unnecessary code

  • Potential confusion for developers

  • Slightly increased deployment gas cost

Recommendations

Remove the unnecessary pragma:

// PerpetualVault.sol, VaultReader.sol

pragma solidity ^0.8.4;
- pragma abicoder v2;
Updates

Lead Judging Commences

n0kto Lead Judge 9 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.

Support

FAQs

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

Give us feedback!