DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: low
Valid

Zero Migration Limit Prevents L1 to L2 Bean TransferZero Migration Limit Prevents L1 to L2 Bean Transfer

Summary

The BeanL1RecieverFacet contains an error where the maximum allowed migrated beans (EXTERNAL_L1_BEANS) is set to zero, effectively preventing any L1 to L2 bean migration.

Vulnerability Details

uint256 constant EXTERNAL_L1_BEANS = 0;

This constant is used in the recieveL1Beans function to check if the total migrated beans exceed the maximum allowed:

require(
EXTERNAL_L1_BEANS >= s.sys.migration.migratedL1Beans,
"L2Migration: exceeds maximum migrated"
);

With EXTERNAL_L1_BEANS set to 0, this check will always fail as soon as any beans are migrated, causing the transaction to revert.

Impact

This completely breaks the L1 to L2 bean migration functionality. No beans can be transferred from L1 to L2, rendering the entire migration process non-functional. This could potentially halt or severely disrupt the planned migration of the Beanstalk protocol to L2.

Tools Used

Manual code review

Recommendations

Set the EXTERNAL_L1_BEANS constant to the actual maximum number of beans that should be allowed to migrate from L1 to L2. The exact value should be determined based on the specific requirements of your migration process. You can also consider making this limit configurable by the contract owner or governance, allowing for adjustments if needed in the future.

Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

`EXTERNAL_L1_BEANS` defined with `0` will fail require(EXTERNAL_L1_BEANS >= s.sys.migration.migratedL1Beans, "L2Migration: exceeds maximum migrated");

Appeal created

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Validated
Assigned finding tags:

`EXTERNAL_L1_BEANS` defined with `0` will fail require(EXTERNAL_L1_BEANS >= s.sys.migration.migratedL1Beans, "L2Migration: exceeds maximum migrated");

Support

FAQs

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