# Can deposit native token for free and steal funds

depositErc20 accepted NATIVE sentinel address; safeTransferFrom to EOA silently succeeded, letting attacker mint free deposits and drain funds on destination chain.

- Payout: Audit contest
- Severity: high
- Program: Biconomy
- Found by: cmichel
- Disclosed: 2022-07-25
- Write-up quality: 7/10
- Original: https://github.com/code-423n4/2022-03-biconomy-findings/issues/55
- Library page: https://bugbountylibrary.com/r/c4%3A2022-03-biconomy%3AH-01
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** LiquidityPool.depositErc20 (Hyphen bridge contract)
**Root cause:** depositErc20 did not reject tokenAddress == NATIVE (0xEeee...EEeE). SafeERC20.safeTransferFrom performs a low-level call to that EOA, which always succeeds and returns no data, so no tokens are actually transferred.
**Steps:**
1. Call `depositErc20(tokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE, amount=arbitrary, ...)` on LiquidityPool
2. safeTransferFrom low-level calls the EOA sentinel; call succeeds with empty returndata, no revert
3. Contract emits Deposit event identical to a real depositNative
4. Attacker receives native funds on the destination chain without paying anything
**How found:** Code review of depositErc20 noticed it lacked the NATIVE-address guard present in depositNative, and reasoned that SafeERC20's low-level call to an EOA sentinel cannot revert, making the transfer a no-op.
**Exploitation:** Attacker repeatedly calls depositErc20 with the NATIVE sentinel and arbitrary amount, paying zero tokens but generating valid Deposit events; the bridge releases real native liquidity on the destination chain, draining pool funds.
**Insight:** When a contract uses a sentinel address (e.g. 0xEeee...EEeE) to represent native token, check every ERC20 path for a guard rejecting that sentinel; SafeERC20's low-level call to an EOA silently succeeds, turning the transfer into a no-op while state/events still record a deposit.
