Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Invalid

M-01: Invalid implementation following natspec

Summary

Vulnerability Details

The _repayinternal function of LendingPool.solspecifies "If onBehalfOf is set to address(0), the function defaults to repaying the caller's own debt." This can lead to broken functionality with bad assumptions about the contract

Impact

The _repayinternal function of LendingPool.solwhich creates the following issues when used otherwise

  • Misrepresented assumption of fallback logic which in this case none of that exists

  • Protocol Integrations Break – External integrations relying on explicit onBehalfOf assignments might behave unpredictably, resulting in incorrect debt accounting.

Tools Used

Manual Review

Recommendations

  • Remove the if (onBehalfOf == address(0)) revert AddressCannotBeZero();to comply with the natspec

  • Add the fallback handling of zero address in _repayfunction that takes the msg.senderinto consideration

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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