Claim should estimate fees to prevent failed transactions
When sending message to the LayerZero endpoint, it's essential to ensure that enough amount of gas is included for the transaction. If a user don't include enough tokens for the gas, the transaction will fail.
The Distribution::claim()
function allows the user to pass any value they want which might result in them sending not enough. Thus their transaction will fail.
To know how much gas need to be send, there's an estimateFees()
function as described here.
This issue is similar with previous audit on code4rena,
https://github.com/code-423n4/2022-05-velodrome-findings/issues/80
Failed to claim due to lack of gas fee calculation
Manual analysis
Consider to use the estimateFees()
function and apply the msg.value check with it
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.