Skip to main content

Smart Contract Deployment Status

Last Updated: January 27, 2026
Network: Base Sepolia (Chain ID: 84532)
Latest Deployment: January 26, 2026 at 15:57:37 UTC

βœ… Current Deployed Contracts (v2.1.0)

1. PredictaCoreV2 (UUPS Upgradeable Proxy)

Proxy Address: 0x0828FCc983E7d0e9DD58B2a0A985c62e3ecb6eB6
Implementation Address: 0xda057595F1667FfA1436eFCd98102b437c3bF7f1
Version: 2.1.0 (with Conditional Orders)
Deployment Date: January 26, 2026 15:57:37 UTC
Upgrade Transaction: 0x262c48eb0bc740e689ff96de61b438330de25e4575449b3100c15398e4345c3c
Features:
  • βœ… Gasless betting with PUSD token
  • βœ… Market creation and resolution
  • βœ… Limit orders (on-chain)
  • βœ… Conditional orders: Take Profit, Stop Loss, Trailing Stop Loss
  • βœ… UUPS upgradeable pattern
  • βœ… ReentrancyGuard protection
  • βœ… Ownable access control
Code Reference: contracts/PredictaCoreV2.sol

2. SimplePUSD (ERC-20 Token)

Address: 0x3a0bc621A6f1A80529C6C214c3dAa9386D045957
Symbol: PUSD
Decimals: 18
Type: Non-transferable platform token
Purpose: Gasless betting currency
Features:
  • βœ… Minting controlled by RewardsController
  • βœ… Non-transferable (platform-specific)
  • βœ… ERC-20 compatible for approvals
Code Reference: contracts/SimplePUSD.sol

3. SimplePUSDController (Rewards Controller)

Proxy Address: 0x0b861fBDEeC6f6800019453189EFfB25a5f84828
Purpose: Mint PUSD for user rewards and signup bonuses
Features:
  • βœ… 100 PUSD signup bonus
  • βœ… Milestone-based rewards
  • βœ… Admin-controlled minting
Code Reference: contracts/SimplePUSDController.sol

πŸ“Š Deployment History

v2.1.0 - Conditional Orders Upgrade

Date: January 26, 2026 15:57:37 UTC
Broadcast: /broadcast/UpgradePredictaCoreV2.s.sol/84532/run-1769443057484.json
Changes:
  • Added ConditionalOrder struct and mappings
  • Added ConditionalOrderType enum (TP/SL/TSL)
  • Added functions:
    • createConditionalOrder()
    • executeConditionalOrder()
    • updateTrailingStop()
    • cancelConditionalOrder()
    • getUserConditionalOrders()
    • getMarketConditionalOrders()
Transactions:
  1. Deploy new implementation: 0x42bc2e8ae0ce59d4ed1d1e404a328287f5f9239eab86247a7e1486bef9005ec7
  2. Upgrade proxy: 0x262c48eb0bc740e689ff96de61b438330de25e4575449b3100c15398e4345c3c
  3. Configure PUSD token: 0xa54b3315e3295c619f4dcc8a2288181cca2cf35b69d1166b0e8c0341655b6181
  4. Configure rewards controller: 0x1c469b9823eeb9643592105f1d96bdffaf51d59e177d645935527dcf203416eb

v2.0.0 - PUSD Integration

Date: January 25, 2026 16:57 UTC
Broadcast: /broadcast/UpgradePredictaCoreV2.s.sol/84532/run-1769360223728.json
Changes:
  • Migrated from ETH-based to PUSD-based betting
  • Added gasless transaction support
  • Integrated with SimplePUSD token
  • Added RewardsController support
  • Maintained backward compatibility with ETH betting

v1.0.0 - Initial PUSD Ecosystem Deployment

Date: January 25, 2026 16:55 UTC
Broadcast: /broadcast/DeployPUSDEcosystem.s.sol/84532/run-1769360100543.json
Deployed:
  • SimplePUSD token
  • SimplePUSDController proxy
  • Initial token configuration

πŸ” Contract Verification Status

PredictaCoreV2

  • βœ… Source code deployed
  • βœ… UUPS proxy verified
  • βœ… Implementation contract functional
  • ⚠️ Etherscan verification: PENDING (manual verification needed)

SimplePUSD

  • βœ… Source code deployed
  • ⚠️ Etherscan verification: PENDING

SimplePUSDController

  • βœ… Source code deployed
  • βœ… UUPS proxy configured
  • ⚠️ Etherscan verification: PENDING

πŸ“ Configuration Summary

PredictaCoreV2 Settings

pusdToken: 0x3a0bc621A6f1A80529C6C214c3dAa9386D045957
rewardsController: 0x0b861fBDEeC6f6800019453189EFfB25a5f84828
minBetAmount: 1000000000000000000 (1 PUSD)
owner: 0x2aafc3579d8977dd29120f4600f9a2dce5804415

Keeper Wallet

Address: Configured via KEEPER_PRIVATE_KEY environment variable
Purpose: Execute automated limit orders and conditional orders
Gas: Sponsored by Pimlico/CDP paymasters (gasless)
Execution Frequency: Every 30 seconds via Cloud Scheduler

πŸ”„ Upgrade Process

UUPS Upgrade Pattern

The contract uses OpenZeppelin’s UUPS (Universal Upgradeable Proxy Standard) pattern:
  1. Proxy Contract: 0x0828FCc983E7d0e9DD58B2a0A985c62e3ecb6eB6 (never changes)
  2. Implementation Contract: 0xda057595F1667FfA1436eFCd98102b437c3bF7f1 (can be upgraded)
  3. Storage: All state stored in proxy, preserved during upgrades

How to Upgrade

# 1. Update contract code in contracts/PredictaCoreV2.sol
# 2. Run Foundry script
forge script scripts/UpgradePredictaCoreV2.s.sol:UpgradePredictaCoreV2 \
  --rpc-url base-sepolia \
  --broadcast \
  --verify \
  -vvvv

# 3. Verify deployment
cast call 0x0828FCc983E7d0e9DD58B2a0A985c62e3ecb6eB6 "version()(string)" \
  --rpc-url https://sepolia.base.org

πŸ§ͺ Testing Status

Unit Tests

  • βœ… Market creation and betting
  • βœ… PUSD approval and transfer
  • βœ… Limit order placement
  • βœ… Conditional order creation
  • ⚠️ Conditional order execution: NEEDS TESTING
  • ⚠️ Trailing stop loss updates: NEEDS TESTING

Integration Tests

  • βœ… Gasless transactions via Pimlico
  • βœ… Gasless transactions via CDP
  • βœ… PUSD minting and distribution
  • ⚠️ Keeper wallet execution: NEEDS TESTING
  • ⚠️ Cross-contract interactions: NEEDS TESTING

Test Command

# Run all tests
forge test -vv

# Run specific test file
forge test --match-contract PredictaCoreV2Test -vvv

# Run with gas reporting
forge test --gas-report

πŸ› Known Issues

Issue #1: Firestore Sync for Automated Orders

Severity: πŸ”΄ Critical
Status: Identified, solution proposed
Affected: Limit orders, TP/SL/TSL executed by keeper wallet
Details: See TRADING_SYSTEM_ANALYSIS.md

Issue #2: Etherscan Verification

Severity: 🟑 Medium
Status: Pending manual verification
Affected: All contracts
Action Required: Manually verify contracts on Basescan

πŸ“¦ Contract Sizes

ContractSizeLimitStatus
PredictaCoreV2~18 KB24 KBβœ… OK
SimplePUSD~2 KB24 KBβœ… OK
SimplePUSDController~8 KB24 KBβœ… OK

Blockchain Explorers

Documentation


πŸš€ Next Steps

Immediate Actions (This Week)

  1. Verify contracts on Basescan
    • PredictaCoreV2 implementation
    • SimplePUSD token
    • SimplePUSDController
  2. Test keeper wallet execution
    • Place limit orders on testnet
    • Verify automated execution works
    • Monitor Cloud Scheduler logs
  3. Implement Firestore sync fix
    • Add Firestore updates to keeper execution
    • Test with real orders
    • Deploy updated Cloud Function

Short-term (Next 2 Weeks)

  1. Add contract events indexing
    • Event listener for LimitOrderExecuted
    • Event listener for ConditionalOrderExecuted
    • Event listener for TrailingStopUpdated
  2. Build event-driven indexer
    • Cloud Function to parse events
    • Update Firestore portfolios
    • Handle all order types

Long-term (Next Month)

  1. Security audit preparation
    • Comprehensive test coverage
    • Gas optimization
    • Access control review
  2. Mainnet deployment planning
    • Migration strategy
    • User communication
    • Rollback procedures

πŸ” Security Considerations

Access Control

  • βœ… Owner-only functions protected with onlyOwner modifier
  • βœ… UUPS upgrade restricted to owner
  • βœ… Reentrancy guards on critical functions
  • βœ… RewardsController minting limited to authorized address

Emergency Procedures

  • Pause Trading: Update minBetAmount to max value (temporary)
  • Upgrade Contract: Deploy new implementation via UUPS
  • Emergency Withdrawal: Admin can withdraw contract PUSD balance
  • Kill Switch: Transfer ownership to multisig or burn (irreversible)

πŸ“ˆ Gas Optimization

Function Gas Costs (Estimated)

FunctionAvg GasCost @ 1 Gwei
placeBetWithPUSD()~150,000$0.0002
placeLimitOrder()~180,000$0.0003
createConditionalOrder()~200,000$0.0003
executeConditionalOrder()~120,000$0.0002
updateTrailingStop()~80,000$0.0001
Note: All user transactions are gasless (sponsored by paymasters)

🎯 Summary

βœ… What’s Working

  • PredictaCoreV2 v2.1.0 deployed and operational
  • PUSD token integrated with gasless transactions
  • Limit orders and conditional orders on-chain
  • UUPS upgradeable architecture
  • Keeper wallet configured for automated execution

⚠️ What Needs Attention

  • Etherscan verification pending
  • Firestore sync for automated orders missing
  • Keeper execution needs production testing
  • Event indexing not yet implemented

πŸŽ‰ Major Achievements

  • Successfully upgraded to v2.1.0 with conditional orders
  • All contracts deployed on Base Sepolia
  • Gasless transaction architecture working
  • Blockchain-first architecture implemented
Status: Production-ready for testnet, needs fixes before mainnet