Skip to content

Conversation

@extrawurst
Copy link
Contributor

@extrawurst extrawurst commented Nov 28, 2025

Description

The refunder fails when batches contain orders whose owners cannot receive ETH (e.g., EOF contracts). This causes the entire batch to revert with EthTransferFailed, blocking valid refunds and triggering gas price escalation.

Note: This issue currently affects Sepolia where EOF (EVM Object Format) contracts exist. EOF is not yet deployed on mainnet.

Root Cause

The EthFlow contract uses push-based refunds that require owners to accept ETH. When any owner in a batch rejects the transfer, the entire transaction reverts.

Solution

Added can_receive_eth() that uses gas estimation to detect addresses that cannot receive ETH. Orders with non-receivable owners are marked as "Invalid" and filtered out before batching, following the existing zero-owner filtering pattern.

This filter applies to any contract that rejects ETH (missing receive/fallback, or EOF contracts), not just EOF-specific cases.

Verification

The problematic Sepolia EOF contract can be verified:

# Check bytecode (EOF contracts start with 0xef01)
cast code 0x66C9152339ce05EE0C8A8eff9EeF8230AbFe8350 --rpc-url https://ethereum-sepolia-rpc.publicnode.com

# Verify ETH transfer fails
cast estimate 0x66C9152339ce05EE0C8A8eff9EeF8230AbFe8350 --value 1 --rpc-url https://ethereum-sepolia-rpc.publicnode.com

caused by orders whose owners cannot receive ETH.
When such orders are included in a batch, the entire transaction reverts with `EthTransferFailed`,
blocking valid orders from being refunded.
@extrawurst extrawurst requested a review from a team as a code owner November 28, 2025 15:32
@extrawurst extrawurst marked this pull request as draft November 28, 2025 15:38
@extrawurst extrawurst marked this pull request as ready for review November 28, 2025 17:12
Copy link
Contributor

@squadgazzz squadgazzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good catch!

@extrawurst extrawurst added this pull request to the merge queue Nov 28, 2025
Merged via the queue into main with commit 382a37f Nov 28, 2025
18 checks passed
@extrawurst extrawurst deleted the fix-refunder-issue-when-receiver-is-a-contract-that-cannot-receive-funds branch November 28, 2025 18:11
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants