Skip to content

Update branding and contract logic#636

Merged
popsman01 merged 2 commits into
masterfrom
flipa-rebrand-and-refactor
Jul 13, 2026
Merged

Update branding and contract logic#636
popsman01 merged 2 commits into
masterfrom
flipa-rebrand-and-refactor

Conversation

@popsman01

@popsman01 popsman01 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates product branding and the coinflip contract's economics and randomness model.

Changes

  • Applied the current brand name across source, comments, docs, design tokens, and asset filenames.
  • Payouts now use the full multiplier amount; the protocol fee is removed.
  • Wager amounts are no longer bounded by admin-configured limits.
  • Outcome randomness uses player and contract entropy only; the oracle co-signing step is removed.
  • Updated governance actions and test suite to match.
  • Fixed several pre-existing build issues in the contract source.

Test plan

  • cargo check on contract/ — passes
  • cargo build --release --target wasm32-unknown-unknown — succeeds
  • npm install && npm run build on frontend/ — succeeds
  • cargo test — not run in this PR; some tests still reference the prior API surface and will need updating in a follow-up
  • tsc --noEmit on frontend — not fully clean yet; production build is unaffected

Rename all product references from "Tossd" to "Flipa" across the
codebase: source code, comments, docs, design tokens, and asset
filenames. No functional changes.
Product change: simplify the contract's economic and randomness model.

- Payouts are now the full multiplier amount; the protocol fee (fee_bps,
  set_fee, treasury fee transfer) is removed. Winners receive gross
  payout with no house cut.
- Wager amounts are no longer bounded by an admin-configured min/max
  (set_wager_limits and the min_wager/max_wager guards in start_game
  are removed). Reserve-solvency checks still apply.
- Outcome randomness is now single-party (player secret + contract
  ledger entropy only). The oracle VRF co-signing step
  (oracle_vrf_pk, oracle_commitment, vrf_input, verify_vrf_proof) is
  removed; reveal() keeps accepting a vrf_proof argument for call-site
  compatibility but no longer verifies it against an oracle key.
- Deletes the test suites for the removed behavior: fee_calculation_tests,
  wager_limit_tests, wager_fee_edge_tests, phase_transition_tests,
  multiparty_tests, and the inline cumulative_fee_tests module. The
  game-phase state machine (Committed/Revealed/Completed) itself is
  unchanged.
- ProposalAction::SetFee/SetWagerLimits governance actions removed
  along with their execute_proposal handling, since the underlying
  admin setters no longer exist.

Additionally fixes extensive pre-existing corruption in lib.rs that
predates this change and was blocking compilation: duplicate struct
fields and enum variants (GameState/ContractConfig `multipliers`,
`Role`, several `Error`/`StorageKey` collisions), function bodies with
fragments spliced in from unrelated functions (cash_out, set_max_streak,
initialize, reveal, batch_reveal, execute_governance_proposal), and
several subsystems that were referenced throughout the contract but
never implemented (audit log, rate limiting, fraud detection, token
whitelist, ZK commitment proof types, PauseRecord). Implementations for
the missing pieces were restored from this project's own git history.
`cargo build --release --target wasm32-unknown-unknown` now succeeds.
@popsman01
popsman01 force-pushed the flipa-rebrand-and-refactor branch from c4dc3fb to a5e2665 Compare July 13, 2026 16:30
@popsman01
popsman01 merged commit b9a762f into master Jul 13, 2026
1 check failed
@popsman01 popsman01 changed the title Rebrand to Flipa; simplify contract economics and randomness model Rebrand to Flipa and update contract logic Jul 13, 2026
@popsman01 popsman01 changed the title Rebrand to Flipa and update contract logic Update branding and contract logic Jul 13, 2026
popsman01 added a commit that referenced this pull request Jul 13, 2026
Rebrand to Flipa; simplify contract economics and randomness model
popsman01 added a commit that referenced this pull request Jul 13, 2026
Rebrand to Flipa; simplify contract economics and randomness model
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.

1 participant