# Users cannot unstake from YiedlETHStakingEtherfi.sol, because YieldAccount.sol is incompatible with ether.fi's WithdrawRequestNFT.sol

YieldAccount lacks onERC721Received, so ether.fi's WithdrawRequestNFT._safeMint reverts, permanently blocking all unstake/withdrawal flows and locking user funds.

- Payout: Audit contest
- Severity: high
- Program: BendDAO
- Found by: oakcobalt
- Disclosed: 2024-09-03
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2024-07-benddao-findings/issues/19
- Library page: https://bugbountylibrary.com/r/c4%3A2024-07-benddao%3AH-06
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity technique:incomplete-fix technique:source-review vuln:dos

**Target:** YieldAccount.sol / YiedlETHStakingEtherfi.sol staking contract
**Root cause:** YieldAccount does not implement onERC721Received (nor inherit ERC721Holder), so ether.fi's WithdrawRequestNFT._safeMint reverts when minting the withdrawal-request NFT to the yield account.
**Steps:**
1. User calls `YieldStakingBase::unstake` on YiedlETHStakingEtherfi
2. Flow reaches `YieldEthStakingEtherfi::protocolRequestWithdrawal` -> `liquidityPool::requestWithdraw` -> `WithdrawRequestNFT::requestWithdraw`
3. `requestWithdraw` calls `_safeMint(recipient=yieldAccount, requestId)`
4. `_checkOnERC721Received` calls `onERC721Received` on yieldAccount, which is not implemented
5. require fails: 'ERC721: transfer to non ERC721Receiver implementer'; unstake reverts
**How found:** Traced the unstake call chain into ether.fi's WithdrawRequestNFT and noticed it uses _safeMint, then checked YieldAccount.sol and found no onERC721Received; also noted unit tests passed only because a mock used _mint instead of _safeMint.
**Exploitation:** Not an attack; a functional DoS. Any unstake attempt reverts, locking staked funds, yield, and NFT collateral, and letting yieldBorrow debt compound if positions become unhealthy.
**Insight:** When integrating external protocols that mint NFTs to your contract, verify the mint path uses _safeMint and that your contract implements onERC721Received; beware mocks that use _mint and mask this incompatibility in tests.

