-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
component:soliditySolidity/Yul codeSolidity/Yul codefrom-auditFinding from security auditFinding from security auditsecuritySecurity-related issuesSecurity-related issuesseverity:lowLow severity findingLow severity findingtool:auditAgentFound by Nethermind AuditAgentFound by Nethermind AuditAgent
Description
Summary
rescueETH() uses Solidity .transfer() which forwards only 2300 gas. If owner is a smart contract with a gas-intensive receive/fallback, ETH recovery will always revert.
Audit Source
- Report:
audit/liq_audit_report_1.json(Finding Optimization: Skip pre-balance check #3) - Tool: Nethermind AuditAgent
- Date: 2026-01-02
Location
src/LIQFlashYul.sol - lines 256-259
function rescueETH() external {
require(msg.sender == owner, "NOT_OWNER");
payable(owner).transfer(address(this).balance);
}Impact
- Permanent loss of ETH if owner is a contract requiring >2300 gas
- ETH can accumulate via
receive()andfallback()
Severity Justification
Low - Only affects owner, easily avoided by using an EOA owner. However, could cause permanent fund loss.
Proposed fix (Oracle, unreviewed):
Use call pattern:
function rescueETH() external {
require(msg.sender == owner, "NOT_OWNER");
(bool success, ) = owner.call{value: address(this).balance}("");
require(success, "ETH_TRANSFER_FAILED");
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component:soliditySolidity/Yul codeSolidity/Yul codefrom-auditFinding from security auditFinding from security auditsecuritySecurity-related issuesSecurity-related issuesseverity:lowLow severity findingLow severity findingtool:auditAgentFound by Nethermind AuditAgentFound by Nethermind AuditAgent