The RESDLTokenBridge
contract uses extraArgs
in the setExtraArgs
and transferRESDL
functions. The concern lies in the potential misconfiguration of extraArgs
for specific chains, leading to the use of default values in the _buildCCIPMessage
function. This may result in unintended behavior, non-optimal gas usage, and security risks.
The contract allows for the mutable updating of extraArgs
using the setExtraArgs
function. However, if extraArgs
are not configured for a particular chain in the transferRESDL
function, the _buildCCIPMessage
function utilizes default values, including a non-refundable gas limit of 200,000. This lack of explicit configuration may lead to unexpected behavior, gas inefficiencies, and potential security risks. The order of message will also be effected because the default strict
value will be false in extraArgs.
setExtraArgs
transferRESDL
_buildCCIPMessage
The impact of this issue includes:
Unintended Behavior: Default values may lead to unexpected behavior in the execution of CCIP messages on the destination chain.
Non-Optimal Gas Usage: The default gas limit of 200,000 may not be sufficient, resulting in transaction failures due to out-of-gas errors.
Inconsistent Execution: The order of parameters within the CCIP message may be unexpected, potentially causing inconsistent execution on the destination chain.
Non-Refundable Gas Fees: Default gas limit being non-refundable may result in higher gas fees being consumed without successful execution.
Security Risks: Depending on the specifics of the CCIP message, there may be security risks associated with unintended behavior or unexpected states.
Manual review.
Documentation and Guidance: Clearly document and provide guidance on the expected configuration of extraArgs
for each supported chain to prevent unintentional misconfigurations.
Default Value Considerations: Carefully choose default values in the absence of configured extraArgs
to ensure they align with the expected behavior of the system and provide optimal gas usage.
Validation in _buildCCIPMessage
: Implement additional validation or checks in the _buildCCIPMessage
function to handle scenarios where extraArgs
are not configured, ensuring that default values are appropriate for the given context.
Addressing these recommendations is crucial to mitigating the potential risks associated with the misconfiguration of extraArgs
and ensuring the reliability and security of the RESDLTokenBridge
contract.
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.