The `IFlashLoanReceiver` interface defines `executeOperation()` as returning a `bool`. Flash loan receivers are expected to implement this interface and communicate the outcome of their callback logic through this return value.
`ThunderLoan::flashloan()` never decodes or validates the return value of the `executeOperation()` callback — the `bool` is silently discarded. This creates a misleading contract with integrators, who may rely on `return false` as a graceful failure mechanism rather than using `revert`, unknowingly bypassing any error signaling they intended to implement.
Likelihood:
This issue manifests any time a flash loan receiver implements error-handling logic based on `return false` instead of `revert`, a pattern explicitly suggested by the interface signature itself.
The likelihood increases as third-party integrators familiar with Aave's flash loan standard port their receivers to ThunderLoan, expecting the same return value validation behavior.
Impact:
Receivers that rely on `return false` to signal a failed operation will have their error logic silently ignored, causing the flash loan to proceed as if the callback succeeded, with the only safety net being the ending balance check.
The misleading interface creates a false sense of security for integrators, potentially masking bugs in receiver logic that would otherwise be caught through proper return value validation.
This contract request a flashLoan and return a false boolean that should revert
Running the test above demonstrates that testReturnValueIsIgnored() fails
because no revert occurs. The flash loan completes successfully despite
executeOperation() returning false, confirming that the return value is
never validated by the protocol.
There are two option:
1) updating `ThunderLoan::flashloan()` to explicitly decode and validate the return value of the `executeOperation()` callback, reverting if the receiver signals a failed operation.
2) Alternatively, if the protocol does not intend to support graceful failure via return value, the `bool` return type should be removed from the `IFlashLoanReceiver` interface to accurately reflect the actual behavior and avoid misleading integrators
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.