# CEthInterface#mint() reading non-existing returns makes topUp() with native token always revert

Backd's CompoundHandler declared CEther.mint() as returning uint256, but CEther.mint() returns nothing, so native-token topUp() always reverts.

- Payout: Audit contest
- Severity: medium
- Program: Backd
- Credited: WatchPug
- Disclosed: 2022-06-02
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2022-04-backd-findings/issues/125
- Library page: https://bugbountylibrary.com/r/c4%3A2022-04-backd%3AM-14
- Tags: domain:web3 impact:dos kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:dos

**Target:** CompoundHandler topUp() / CEthInterface ABI interface
**Root cause:** CEthInterface.mint() is declared `returns (uint256)` but Compound's CEther.mint() returns no data; the same CToken interface is reused for both CEther and CErc20.
**Steps:**
1. Call topUp() with underlying == address(0) (native ETH) and repayDebt false.
2. CompoundHandler executes `ctoken.mint{value: amount}(amount)` against CEther.
3. ABI decoder expects a uint256 return but CEther returns empty data.
4. Transaction reverts with 'function returned an unexpected amount of data'.
**How found:** Code reading of the vendor CTokenInterfaces.sol interface against Compound's actual CEther.mint() implementation, noticing the return-type mismatch between CEther and CErc20.
**Insight:** When an interface is shared across native and ERC20 variants of a protocol (Compound CEther vs CErc20), verify each variant's actual return signature; native variants often return nothing where ERC20 variants return an error code.
