SIMPLIFIED CONTRACT:
- ✅ ETH entry → Swap 100% to TRIA immediately
- ✅ Clean 80/20 split (prize / fees)
- ✅ Constructor accepts parameters for flexible deployment
- ✅ No more buyback confusion
- ✅ All rewards in TRIA
- Open Remix: https://remix.ethereum.org
- Create
EtherTrialsTRIAv10.sol - Copy contract from
src/contracts/EtherTrialsTRIAv10.sol - Compile with Solidity
0.8.20+ - Deploy with these Base Mainnet addresses:
triaAddr: 0xD852713dD8dDF61316DA19383D0c427aDb85EB07 swapRouterAddr: 0x2626664c2603336E57B271c5C0b26F421741e481 wethAddr: 0x4200000000000000000000000000000000000006 - Save your contract address!
- Go to Uniswap V3: https://app.uniswap.org/add
- Select Base Network
- Add liquidity:
- WETH:
0x4200000000000000000000000000000000000006 - TRIA:
0xD852713dD8dDF61316DA19383D0c427aDb85EB07 - Fee Tier: 0.3% (3000) ← CRITICAL!
- Amount: Min 0.1 ETH + equivalent TRIA
- WETH:
Edit src/lib/contracts/etherTrialsTRIAv10ABI.ts:
export const ETHER_TRIALS_TRIA_V10_ADDRESS = '0xYourDeployedAddress' as Address;- Open your app
- Try entering tournament with 0.00002 ETH
- Check transaction on BaseScan
- Verify
EntryPaidevent showstriaReceived > 0 - Check
periods(1).triaPrizePoolincreased
1. User enters tournament
└─ Pays 0.00002 ETH (or more)
└─ Contract swaps 100% ETH → TRIA
└─ 80% TRIA → Prize pool
└─ 20% TRIA → Platform fees
2. User plays game
└─ Can buy dice rolls (also swapped to TRIA)
└─ Each roll adds to prize pool
3. User submits score
└─ Commit score (hash)
└─ Reveal score (within 20 min)
└─ Points = score × (totalModal / 1e18)
4. Period ends (24 hours)
└─ Admin calls allocatePrizes(1)
└─ Users claim TRIA rewards based on points
// After period ends + prizes allocated
startNewPeriod()// Withdraw 20% fees in TRIA
withdrawPlatformFees()setV3Fee(3000) // 0.3%
setV3Fee(500) // 0.05%
setV3Fee(10000) // 1%setEntryBounds(0.00001 ether, 2 ether)Cause: No liquidity in Uniswap V3 pool
Fix:
- Check pool exists at https://info.uniswap.org/#/base/pools
- Add more liquidity if needed
- Verify fee tier matches (0.3% = 3000)
Cause: Entry amount outside bounds
Fix:
- Default min: 0.00002 ETH
- Default max: 1 ETH
- Adjust with
setEntryBounds()if needed
Cause: Period duration is 24 hours
Fix: Wait for periods(1).endTime to pass
minEntry = 0.00002 ether // Lower barrier!
maxEntry = 1 ether
v3Fee = 3000 // 0.3% Uniswap fee tier
ENTRY_PRIZE_PERCENT = 80 // 80% to prize
ENTRY_PLATFORM_PERCENT = 20 // 20% fees
PERIOD_DURATION = 24 hours
REVEAL_WINDOW = 20 minutes
MAX_SCORE = 2_000_000- Contract deployed with correct constructor params
- Liquidity added to Uniswap V3 (0.3% fee tier)
- Frontend updated with contract address
- Test entry works (0.00002 ETH minimum)
- Verify TRIA appears in prize pool
- Test dice roll (free + paid)
- Test commit + reveal score
- Wait for period end
- Admin allocates prizes
- User claims TRIA rewards
- Always add liquidity FIRST before letting users enter
- Start with small test entry (0.0001 ETH) to verify swap
- Monitor prize pool growth in real-time (TRIA balance)
- Use 0.3% fee tier unless you have specific reason to change
- Test on testnet first if unsure about parameters
TRIA Token: 0xD852713dD8dDF61316DA19383D0c427aDb85EB07
Uniswap V3 Router: 0x2626664c2603336E57B271c5C0b26F421741e481
WETH9: 0x4200000000000000000000000000000000000006
Your Contract: [Update after deployment]
- Check BaseScan for transaction details
- Verify pool liquidity on Uniswap Info
- Ensure RPC is Base Mainnet
- Test with very small amounts first
Your tournament is now live with:
- ✅ Automatic ETH → TRIA swaps
- ✅ Real-time prize pool updates
- ✅ Simple 80/20 split
- ✅ Flexible constructor deployment
Ready to compete! 🏆