When an reSDL token is transferring to another chain, it is necessary to pay a gas fee in native token, those gas fee can be increased while the transaction is in the mempool causing the user to pay undesired amounts of fees.
The function RESDLTokenBridge.transferRESDL() helps to send a reSDL token to another chain. In order to send the token to another chain it is necessary to pay a fee which will be calculated depending on the message created.
The problem arises when the user wants to pay the fees in native token and there is an increase in the fees while the transaction is in process. It is important to note that CCIP allows you to specify an extraArgs in the message that is going to be sent to the other chain:
Inside the extraArgs it can be specified the gasLimit to use. The gasLimit is a very important variable to be able to determine the gas fees, as it says in its documentation: It is the main factor in determining the fee to send a message. Unspent gas is not refunded.. Taking into account that the extraArgs can be modified using the function RESDLTokenBridge::setExtraArgs() then the following scenario may arise:
The user determines that the fees to sent his tokens are 10e13 native tokens.
The transaction is sent and waits in the mempool.
The admin changes the values of extraArgs and now the fees increase to 20e13 native tokens. This transaction occurs before step 2.
Now the transaction from step 2 is executed with an unwanted increase in fees.
Likewise, the fee calculation may be increased by Chainlink while the sending token transaction is waiting in the mempool.
The parameter _maxLINKFee helps determine the maximum in the LINK token, however, there is no validation for the native token.
The user will pay unwanted fees if those are increased while the sending transaction is waiting to be executed.
Manual review
Add a parameter that helps specify the maximum fee in native tokens that the user is willing to pay:
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.