CodeHawks-Contests/2026-07-bc-confidence-pools — reverse-engineered prompt
Reverse engineered prompt
Build me a BattleChain smart contract project for confidence pools around active Safe Harbor agreements. I want a factory that can create separate pool contracts, where a sponsor picks an allowed ERC20 staking token, sets the scope of BattleChain accounts, adds an optional bonus, and can only change scope and expiry during the early safe window. Stakers should be able to deposit while things are still in a pre attack state, withdraw before an attack starts, and then get paid back based on the final outcome.
The pool should resolve from the live Safe Harbor registry, with survived, expired, and corrupted outcomes. If it survives or just expires, stakers get their stake back plus a time weighted share of the bonus that strongly favors earlier deposits. If it is corrupted, there should be a path for a named good faith attacker bounty, or otherwise a sweep to the sponsor recovery address. Please include tests and sensible deployment scripts, and check the design doc and BattleChain docs online if you need more context.
Want more depth? Deep Reverse