Unaudited deployment
These contracts are unaudited, and the treasury can pay only from its actual USDC balance. Check the current deployment status and risk disclosures before any interaction.
Direct Referrals
Each wallet creates one account with an immutable lowercase username. A share link uses /?ref=username; after wallet authentication, the backend resolves that public username to its wallet and persists the first eligible referral candidate. The factory's on-chain mapping remains the authority.
Requires the referral-aware deployment
The currently selected Polygon beta factory does not implement these functions. Usernames and candidates may be saved off-chain, but referral accruals, cashback and claims become operational only when the application is switched to the production registry.
First-wager attribution
The first valid link is preserved and cannot be replaced. An existing account may activate it until the paying wallet's first successful wager. That wager permanently records either its database candidate or no referrer. Self-referrals are rejected, failed wagers roll back the attempted on-chain lock, and attribution follows the wallet paying the stake rather than a different share receiver.
Commission and claims
For every referred wager, the vault calculates its theoretical prime-derived edge:
edge = stake × primeBps / (10,000 + primeBps)
The total reward is 30% of that amount: half goes to the direct referrer and half becomes bettor cashback. If the total is odd in base units, the extra unit goes to the bettor. Multiplier-floor edge is excluded, integer arithmetic rounds down, and zero-prime wagers accrue nothing. The bettor's shares and quoted multiplier are still calculated from the full stake.
Both rewards move into the factory's fully backed claimableRewards balances. Referral earnings and cashback are displayed separately, while each wallet withdraws its combined balance with one claimRewards transaction. A recipient cannot block a bettor's deposit.
Permissionless identity
One wallet cannot refer itself, but the contracts cannot prove that two different wallets belong to the same person. The fixed rate and one-time attribution limit code switching; they do not eliminate multi-wallet sybil behavior.