Loops HouseLast Flag

NEAR HACKATHON
Links
Team
1 member- AHOwner
Ahnaf
Overview
Last-bidder games have two problems: everyone except the winner loses their money, and a public countdown turns the ending into a bot and gas war over the final block.
Last Flag is a no-loss version, played as King of the Hill. Each bid plants your flag on the tower and resets the sun. 96% of every bid stays in your own tent in the contract ledger and comes back to you in full. 3% goes to the tower (the prize) and 1% to the previous winner. When the sun sets, a storm starts: anyone can ring the bell once per block, and each bell has a 5% chance of lightning. There is no deadline to snipe, because every block after sunset is equally likely to end the hill. The flag on top wins a banner NFT that holds 80% of the tower, and the tents still standing split the other 20%.
How NEAR fits in:
- The banner is a NEP-171 NFT minted by the game contract. It holds the prize and earns 1% of every bid in the next hill. Whoever holds it collects, so it can be transferred or sold with its income.
- Function-call access keys give one-tap bids. You prefund a war chest, and a key limited to the bid method signs each bid with no wallet popup. That key cannot withdraw.
- The strike is rolled from NEAR block randomness, and the bell is permissionless: whoever rings the striking bell earns 0.05 NEAR from the tower.
- The contract (Rust, near-sdk 5) has no owner, no admin method and no upgrade method. Parameters are fixed at deploy.
It is live on testnet at lastflag-v2.testnet with a hosted keeper and bots, and a hill lasts about an hour. The repo also has a browser simulator that needs no wallet, contract unit tests, and end-to-end tests that run on a local NEAR node. The README documents the threat model, including the bounded block-producer bias in the randomness.