Voyage to Ithaca Writeup
Light House Treasury
Lighthouse Treasury - Step-by-Step Solution and Exploit Guide
Challenge Name: Lighthouse Treasury Category: Blockchain / Smart Contracts Points: 400 Win Condition: Drain Treasury so that lum.balanceOf(Treasury) is less than 1.0 ether (Treasury.isSolved() == true) Flag: rvcectf{l1ghth0us3_tr34sury_dr41n3d_4626_fl4sh_d3l3g4t3}
- VULNERABILITY BREAKDOWN
Solving Lighthouse Treasury requires chaining three smart contract vulnerabilities.
-
ERC-4626 Share Inflation Attack - Vault.sol Root cause: There is no virtual offset in convertToShares. Integer division truncates to zero when donations drastically increase totalAssets relative to totalSupply.
-
Flash Governance - Governor.sol Root cause: vote() checks vault.balanceOf(msg.sender) at call time instead of using historical block checkpoints.
-
Delegatecall Storage Collision - Treasury.sol and Logic.sol Root cause: Treasury.execute uses delegatecall. Storage slot 0 in Treasury is owner, while slot 0 in Logic is lastCaller. Executing Logic.recordCall(player) overwrites Treasury.owner with the player's address.
- INTERACTIVE CLI / TUI STEP-BY-STEP EXPLOIT
These commands can be run in the Terminal UI using "make play" or in the Web UI terminal at http://localhost:8000.
STEP 1: RESET THE CHAIN
Start from a clean, deterministic state:
resetExpected state:
- Player starting balance: 10.0000 LUM
- Treasury starting balance: 10,000.0000 LUM
- Vault total shares: 0
STEP 2: INFLATE THE VAULT SHARE PRICE
The goal is to prevent the automated Keeper from acquiring voting shares when the epoch advances.
-
Approve the Vault to spend the player's LUM:
send LUM approve Vault 115792089237316195423570985008687907853269984665640564039457584007913129639935
