Description:
The external functions in AaveDIVAWrapper
directly return values from internal core contract calls without explicit validation (e.g., checking for non-zero addresses or valid pool IDs). While many internal functions use revert
on critical errors, not all failure modes are covered by reverts. This creates a risk of propagating invalid states if underlying dependencies (e.g., DIVA Protocol) return invalid values instead of reverting.
impact:
Inconsistent State: Callers may receive invalid data (e.g., zero addresses, empty pool IDs) that they assume to be valid, leading to broken integrations.
Silent Failures: Transactions could appear successful but return garbage values, causing financial losses if users act on these values.
Defense-in-Depth: Even if internal functions revert on most errors, explicit validation protects against:
Bugs in dependencies (e.g., DIVA returning bytes32(0) for failed pool creation).
Future code changes where internal checks might be relaxed.
Clarity: Forces failures to surface at the point of interaction, making debugging easier.
Proof of Concept:
Recomended Mitigation:
Add explicit validation for critical return values:
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.