Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0xKann - Lack of WETH Handling in StreamEscrow Contract #171

Open
sherlock-admin4 opened this issue Nov 30, 2024 · 0 comments
Open

0xKann - Lack of WETH Handling in StreamEscrow Contract #171

sherlock-admin4 opened this issue Nov 30, 2024 · 0 comments

Comments

@sherlock-admin4
Copy link

sherlock-admin4 commented Nov 30, 2024

0xKann

Medium

Lack of WETH Handling in StreamEscrow Contract

Summary

The StreamEscrow contract is designed to send ETH to the treasury but lacks logic to handle Wrapped Ether (WETH). This oversight assumes the system only uses native ETH, even though WETH may be wrapped earlier in the workflow or received from external protocols.

Root Cause

While this issue does not present a direct attack vector, it creates operational risks:
https://github.com/sherlock-audit/2024-11-nounsdao/blob/main/nouns-monorepo/packages/nouns-contracts/contracts/StreamEscrow.sol#L303-L309
Denial of Treasury Funds: If the contract receives WETH instead of ETH (e.g., from a protocol or user), the funds may remain trapped in the contract and cannot be transferred to the treasury.
Protocol Incompatibility: External integrations requiring WETH interactions may fail to operate correctly with the contract.

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

Operational Risk:

Funds sent to the contract as WETH cannot be transferred to the treasury, leaving them inaccessible.
The treasury's ETH balance will be lower than expected, causing discrepancies in fund tracking and accounting.
Interoperability Issues:

The system may become incompatible with protocols or users that deal in WETH rather than native ETH.

PoC

Add a check if ETH is wrapped to WETH to send to treasury with WETH

IWETH(WETH_ADDRESS).deposit{value: 10 ether}(); // Wrap 10 ETH into WETH
IWETH(WETH_ADDRESS).transfer(streamEscrowAddress, 10 ether); // Send WETH to the contract
streamEscrow.sendETHToTreasury();

Mitigation

No response

@sherlock-admin4 sherlock-admin4 changed the title Polished Pear Hedgehog - Lack of WETH Handling in StreamEscrow Contract 0xKann - Lack of WETH Handling in StreamEscrow Contract Dec 4, 2024
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

No branches or pull requests

1 participant