starling
Trust

Security model

Who can do what

whocancannot
Anybodyopen a flock, join, launch after the deadline, push claimschange a flock, redirect tokens, take deposits
Creatorchoose the params at open, cancel before the deadline, reclaim the fee reservechange the params after, move deposits, launch early, take tokens
Depositorleave until the deadline, claim, refund when failedtake more than their share
Usnothing: the contract has no owner, no admin and no upgrade pathpause, freeze or redirect anything

What you have to trust

  • The Pons factory and curve. A flock calls them. If they are upgradeable, Pons can change them. The params hash, the economics hash and the price floor make a silent change revert instead of costing you, but they cannot protect you from a malicious upgrade of the token itself.
  • The creator, about the token. A flock gives you a fair price on a token chosen by someone else. If the creator sells his tokens or the project is bad, the flock loses, down to the curve floor.
  • The chain. The deadline uses the block timestamp; a few seconds of drift do not matter.

Design choices that remove risk

  • Hash on chain, params in the event. Nothing about the token can change after people join.
  • State before calls. launch sets the state to Launched before it calls Pons; a reentrancy guard covers every function that sends ETH or tokens.
  • Pull, not push. Refunds and tokens are claimed by their owner. A participant that is a contract refusing ETH only blocks its own refund, never the launch or the others.
  • Rounding down. The sum paid out can never exceed what the flock holds.
  • Balance, not report. The tokens credited are the ones the contract actually holds after the buy.
  • An exit for every failure. Cancelled, under the minimum, not launched in a day, a launch that keeps reverting: every depositor can refund in full.

What is tested

33 tests, including fuzzing of the accounting (every wei is accounted for, with at most a few wei of rounding dust) and attacks: reentrancy through leave, refund and claim, a depositor that rejects ETH, a creator trying to swap the token after people joined. See Proof.

Not auditedThe contract is short and tested against the real chain, but nobody independent has read it. An audit is the next thing it needs, and until then the amounts should stay small.

Reporting a problem

Open an issue on GitHub. A flock with a real flaw should be refunded and abandoned, not patched in place: there is no upgrade path on purpose.