Failure to follow the non-blocking standard recommended by LayerZero can result in blocking the channel between the source and destination applications. This can disrupt the normal flow of transactions and lead to potential denial-of-service scenarios.
According to the LayerZero documentation, the default behavior when a transaction on the destination application fails is that the channel between the source and destination applications gets blocked. Before any new transactions can be executed, the failed transaction must be retried until it succeeds . This behavior can be exploited by an attacker to initiate a transaction they know will fail, effectively blocking the channel.
The proof of concept is that the TempleGold.sol
contract does not implement the non-blocking approach, as seen in the following code snippet:
The _lzReceive
function, which mints the tokens on the destination chain in the TempleTelporter.sol
, is defined as:
This implementation does not adhere to the non-blocking standard recommended by LayerZero. If the _lzReceive function fails, it can block the channel between the source and destination applications, preventing any new transactions from being executed until the failed transaction is retried and succeeds.
Code editor/IDE
LayerZero documentation and code examples
Implement the non-blocking approach recommended by LayerZero to prevent the channel from being blocked. An example implementation can be found in LayerZero's NonblockingLzApp.sol
:
Modify all the lzRecieve functions to follow a similar pattern, ensuring that the communication channel remains open even if a transaction fails.
References:
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.