Severity: Important (correctness)
The Hackathon struct stores prize_pool: i128. The actual amount in escrow is tracked separately by core_escrow.EscrowPool.total_deposited. For hackathons (funded once, locked), these should always match — but they're stored separately, so refactors can drift them.
Fix
- Remove
prize_pool from the Hackathon struct.
- Provide a derived query:
get_prize_pool(hackathon_id) that reads the escrow's total_deposited via cross-contract call.
- Update internal callers to use the derived value.
Risk
Storage layout change → migration required for live hackathons. Plan as part of mainnet pre-launch.
Tests
- Derived getter returns correct amount post-create
- After partial release (via claim), derived value unchanged (we want gross, not net) — confirm the right semantic
Severity: Important (correctness)
The
Hackathonstruct storesprize_pool: i128. The actual amount in escrow is tracked separately bycore_escrow.EscrowPool.total_deposited. For hackathons (funded once, locked), these should always match — but they're stored separately, so refactors can drift them.Fix
prize_poolfrom the Hackathon struct.get_prize_pool(hackathon_id)that reads the escrow'stotal_depositedvia cross-contract call.Risk
Storage layout change → migration required for live hackathons. Plan as part of mainnet pre-launch.
Tests