Skip to content

Conversation

@AayushJhaAudits
Copy link

Summary

This PR adds a validation check to ensure the onBehalfOf address in the supply() function is not the zero address.

Reasoning

Passing the zero address as onBehalfOf could cause undefined behavior or unintended token assignment.
Adding this check prevents potential misuse or loss of funds.

Code Location

File: src/contracts/protocol/pool/Pool.sol
Function: supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode)

Fix

require(onBehalfOf != address(0), Errors.ZERO_ADDRESS_NOT_VALID);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant