
CODEUP audit
A private security review of Codeup (DeFi game), conducted with Three Sigma and completed on 23rd October 2024 over 5 days. 0xSimao disclosed 12 findings: 4 high severity, 1 medium, 2 low and 5 informational.
What Codeup is
CODEUP is an on-chain game: players build towers floor by floor, hiring builders that generate in-game ETH ('gameETH'), and accumulating forty builders mints CUP, an ERC-20 reward token with a Uniswap market created by the game itself.
Scope
The contract custodies real ETH, so the review treated it as a vault with rules: the ETH/WETH accounting behind gameETH, pro-rata tower withdrawals, precision in the game's own rounding, and the CUP/Uniswap creation path.
High severity findings
- Total
ETH,WETHandgameETHare not tracked which will lead to insolvency - Significant rounding errors due to
gameETHnot having precision tower.gameETHForWithdrawshould be reduced pro-rata when there is not enoughETHCodeup::claimCodeupERC20()may be forever DoSed by creating theUniswappool before it is called
Medium severity findings
Low severity findings
Informational findings
- Typos in the codebase
- Hardcoded values present in the codebase
- All functions could have a
startedmodifier as they should not be called before the start time Ownableis unused inCodeupERC20and could be removed- Unused
TransferFailederror inCodeupERC20
The report