MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: low
Valid

`L1Sender` should estimate fees to prevent transaction failures.

Vulnerability Details

When sending a msg to the layer zero endpoint you include enough gas for the transaction. If you don't include enough tokens for the gas, the transaction will fail. The L1Sender contract allows the user to pass any value they want which might result in them sending not enough. Their transaction will fail.

To know how much you have to send there's the estimateFees() function as described here:
https://layerzero.gitbook.io/docs/evm-guides/contract-standards/estimating-message-fees

Tools Used

Manual Review

Recommendations

Use the estimateFees() endpoint to estimate fee and enforce the following check:

require(msg.sender >= estimatedFee, "Less Fee");

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

LayerZero Integration: `sendMintMessage` doesn't verify the `msg.value` sent by the user facilitating failed transactions.

Support

FAQs

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