Update branding and contract logic#636
Merged
Merged
Conversation
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
force-pushed
the
flipa-rebrand-and-refactor
branch
from
July 13, 2026 16:30
c4dc3fb to
a5e2665
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates product branding and the coinflip contract's economics and randomness model.
Changes
Test plan
cargo checkoncontract/— passescargo build --release --target wasm32-unknown-unknown— succeedsnpm install && npm run buildonfrontend/— succeedscargo test— not run in this PR; some tests still reference the prior API surface and will need updating in a follow-uptsc --noEmiton frontend — not fully clean yet; production build is unaffected