The BeanL2MigrationFacet.sol contract in the Beanstalk project lacks a zero address check for the receiver (address to receive Beans on L2) and L2Beanstalk (address of the Beanstalk contract on L2) parameters in the migrateL2Beans function. This could lead to the loss of Beans if a user accidentally or intentionally enters a zero address.
The migrateL2Beans function does not check if the receiver and L2Beanstalk parameters are zero addresses (address(0)). If either of these parameters is a zero address, the Beans will be burned on L1 but not minted on L2, resulting in the loss of the user's Beans.
If the user enters a zero address for receiver or L2Beanstalk, the Beans burned on L1 will not be minted on L2, resulting in loss of assets for the user.
manual
add a zero address check for both the receiver and L2Beanstalk parameters in the migrateL2Beans function
Invalid as per docs https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity
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.