THORChain_Router.sol
Similar to the _deposit function, the transferOut function contains a vulnerability due to the inadequate handling of failed ETH transfers using send. This can result in ETH being permanently locked in the contract if the transfer fails, as there is no proper fallback or error handling mechanism to manage these scenarios.
Code snippet:
Expected Behavior: On failure of ETH transfer, the ETH should be securely returned to the sender or a proper retry mechanism should be in place.
Expected Behavior code snippet:
Logic:
Actual Behavior: The current implementation can lead to ETH getting locked in the contract if the fallback transfer fails.
Actual Behavior code snippet:
Logic:
Its recommended to revise the handling of ETH transfers using .call to provide more gas for recipients and to include explicit error handling or retries, thus aligning the practice with modern Solidity safety standards. This adjustment ensures that transaction failures are managed effectively, preserving contract integrity and user funds.
