Skip to content

Public-sale distributor (tokenomics §2)#17

Merged
RunTimeAdmin merged 1 commit into
masterfrom
feat/public-sale-distributor
Jul 13, 2026
Merged

Public-sale distributor (tokenomics §2)#17
RunTimeAdmin merged 1 commit into
masterfrom
feat/public-sale-distributor

Conversation

@RunTimeAdmin

Copy link
Copy Markdown
Owner

The last token-side launch contract: sells the 15% / 150M public allocation.

CountersigPublicSale — immutable, trustless

  • No owner, no upgrade path, all actions permissionless. Terms fixed at construction — buyers get exactly what they see.
  • Fixed price in a stablecoin (§3 USDC), sale window, hard cap + per-wallet cap, and a soft cap with refund.
  • finalize() (after end, or early on hard cap):
    • Soft cap met → proceeds to treasury, unsold CSIG burned to 0xdead (§2 "unsold … permanently burned"), buyers claim().
    • Soft cap missed → buyers refund() their stablecoin, allocation returns to treasury (a sale that never happened doesn't destroy the allocation).
  • Claim-based delivery, SafeERC20 + nonReentrant + CEI, ceil-rounded pricing. Funds directly when set as the token's publicSale recipient at TGE.

Tests & deploy

17 tests (success/burn/claim, failure/refund, hard/wallet caps, funding guard, early finalize, double-claim/refund guards). DeployPublicSale.s.sol deploys the immutable sale. Full suite 149, slither clean, deploy dry-run clean.

Note: this is the plain-fixed-price design. If you want vested delivery of purchased tokens (my earlier recommendation to soften day-1 float/optics), that's a deliberate follow-on — say so and I'll layer it in.

🤖 Generated with Claude Code

Fixed-price sale of the 15% public allocation. Immutable terms — no owner, no
upgrade path, all actions (buy/finalize/claim/refund) permissionless.

- Buyers pay a stablecoin at a fixed price for $CSIG during [start, end], up to a
  hard cap and per-wallet cap; the contract must hold >= hardCap CSIG.
- finalize() (after end, or early on hard cap): soft cap met -> proceeds to
  treasury, unsold CSIG burned to 0xdead (§2), buyers claim(). Soft cap missed ->
  buyers refund() their stablecoin and the allocation returns to treasury.
- Claim-based delivery so a failed sale refunds cleanly; SafeERC20 + nonReentrant
  + CEI throughout; ceil-rounded pricing.

CountersigPublicSale.t.sol: 17 tests (success/burn/claim, failure/refund, caps,
funding, early finalize, guards). DeployPublicSale.s.sol deploys the immutable
sale. Full suite 149.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@RunTimeAdmin
RunTimeAdmin merged commit d295953 into master Jul 13, 2026
3 checks passed
@RunTimeAdmin
RunTimeAdmin deleted the feat/public-sale-distributor branch July 13, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants