Skip to content

Etherfi Withdrawal Request Gate - #320

Merged
clement-ux merged 5 commits into
mainfrom
sparrowDom/gateEthenaArmOutsideClaim
Jul 27, 2026
Merged

Etherfi Withdrawal Request Gate#320
clement-ux merged 5 commits into
mainfrom
sparrowDom/gateEthenaArmOutsideClaim

Conversation

@sparrowDom

@sparrowDom sparrowDom commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

Gates EtherFiAssetAdapter & WeETHAssetAdapter so an Ether.fi withdrawal NFT owned by the adapter can only be claimed through the adapter itself.

Background

Ether.fi's WithdrawRequestNFT.claimWithdraw(tokenId) is permissionless: anyone can claim a finalized withdrawal NFT, and the proceeds are sent to the NFT owner. In the multi-asset ARM the NFT is owned by EtherFiAssetAdapter or WeETHAssetAdapter, the ARM values the outstanding request once via pendingRedeemAssets, and the adapter's redeem() wraps and sweeps its entire ETH/WETH balance to the ARM.

Fix

A reentrancy-style flag marks the only legitimate window in which Ether.fi may pay this adapter, and receive() rejects claim proceeds that arrive outside it

@sparrowDom
sparrowDom requested review from clement-ux and naddison36 and removed request for clement-ux July 24, 2026 11:09
/// @dev ETH arriving outside an adapter-initiated claim (e.g. a permissionless Ether.fi claim) is
/// rejected. Ether.fi reverts the entire claim, including the NFT burn, when this transfer fails.
receive() external payable {
if (!claimingEtherFi) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@clement-ux is making a point that this check could be:

 if (msg.sender == address(etherfiWithdrawalNFT) && !claimingEtherFi) {

There are pros/cons to it:
🟢 code change would allow sending ETH to adapter in case there was a shortfall
🔴 code change would allow a donation attack

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I lean towards not allowing for a donation attack and accounting for everything. In case we ever need to infuse the adapter/ARM with funds I would rather we make a deliberate function for it

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can always send weth

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

After some thought, I agree that we should keep the first implementation (msg.sender == address(etherfiWithdrawalNFT) && !claimingEtherFi).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nit: you probably ment this by the first implementation:

if (!claimingEtherFi) {

shahthepro
shahthepro previously approved these changes Jul 24, 2026
naddison36
naddison36 previously approved these changes Jul 25, 2026

@naddison36 naddison36 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@clement-ux
clement-ux dismissed stale reviews from naddison36 and shahthepro via 1f048a8 July 25, 2026 11:34

@naddison36 naddison36 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@clement-ux
clement-ux merged commit 236b9ed into main Jul 27, 2026
7 checks passed
@clement-ux
clement-ux deleted the sparrowDom/gateEthenaArmOutsideClaim branch July 27, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants