Skip to content

DeSix Development Progress & Milestones (Project Progress)

Current Stage: Stage 27 (Smart Contract Security Audit Remediation & 5-Bucket Isolated Reserves Deployment)
Last Updated: 2026-05-30
Tech Stack: Base Sepolia / Hardhat / Next.js / ZeroDev AA


📅 Recent Sprint Updates (Sprints 20 - 27)

🚀 Sprint 27 [2026-05-30]: Contract Audit Issue Fixes & 5-Bucket Reserve Isolation Deployment

  • P0-3 Asset Reserve Isolation (O(1) Void Mismatch Remediation):
    • Analysis: In previous designs, _voidIssueBatchInternal used an O(1) quick path to avoid Gas DoS during batch voiding by setting the status to Voided without traversing orders. However, it failed to transfer the issue's total stake issue.totalStake from the LP net equity lpEquity to the refund reserve refundReserve. Consequently, players calling claimRefund directly drained funds from lpEquity, placing LP funds at direct risk of arbitrage or runs and distorting the true value returned by getTVL().
    • Fixes:
      • In DeSixCore.sol's _voidIssueBatchInternal, the total stake issue.totalStake is now automatically deducted from $.lpEquity and deposited in full into $.refundReserve at the exact moment of voiding, achieving complete physical reserve separation.
      • Refactored claimRefund to eliminate legacy execution paths drawing from lpEquity; all refund operations are now strictly paid out from $.refundReserve, while preserving the standard hashrate slashing/reversal logic.
  • P0-2 Recover Expired Claims & Refunds (recoverExpiredClaims Implementation):
    • Analysis: Although errors for expired claims were declared in the contracts, the actual recovery functions (announceClaimRecovery and recoverExpiredClaims) were left unwritten. As a result, unclaimed payouts/refunds exceeding the 365-day expiry (claimExpiry) remained locked in the contract forever, leading to silent LP capital dilution.
    • Fixes:
      • Integrated and adapted announceClaimRecovery(uint64 issueId), allowing the Owner to announce a 7-day public notice for claim recovery.
      • Implemented recoverExpiredClaims(uint256[] calldata orderIds) to validate orders unclaimed for over 365 days, safely routing unclaimed funds from payoutReserve or refundReserve back to lpEquity.
  • White-listed Selector Fix for Test Suite:
    • Fixes: Explicitly registered a mock swap selector 0x12345678 in dutch-auction-buyback.test.ts's beforeEach hook. This resolved test failures caused by the recently added safety whitelist checking on swaps, restoring 7 passing Dutch auction integration tests.

🚀 Sprint 26 [2026-05-29]: Betting Close Gas Estimation Revert & Misleading UI Warnings Fixed

  • Betting Close Gas Estimation Translation Fix:
    • Analysis: When betting is close to deadline or closed, user bets are rejected with a BetExpired error. However, during the eth_estimateGas phase, the error object returned only a generic gas limit warning. This was mistranslated by the legacy SDK as "Betting limit reached (3 times) or risk control triggered," causing severe user confusion.
    • Fixes:
      • Optimized the gas revert fallback logic in the SDK's contract-service.ts, removing the misleading limits warning and describing the failure objectively.
      • Upgraded the Web3 bet-capture state machine to look for '期数已封盘', '期数已截止', and '已截止' alongside BetExpired (or 0xf41de086) to ensure a correct "Betting closed - please wait for the next issue" toast is 100% shown.
  • Remote Synchronization:
    • Committed and pushed all translation corrections, latency-free DrawProgress refactorings, contract-service-draw.ts cache optimizations, and diagnose-oracles.ts debug suites to the remote main branch.

🚀 Sprint 25 [2026-05-29]: Zero-Latency Oracle Dashboard & 4-Stage Pipeline Countdown Refactoring

  • Zero-Latency DrawProgress Dashboard:
    • Eliminated the 8-second loading lag on the orders page. Set the initial loading state of DrawProgress to false, allowing the Stable Heartbeat Panel to load immediately (0ms) from local memory, while moving DrawManager queries to an asynchronous background worker.
    • Added a 800ms debounce to the initial syncWeb3Orders on mount in orders/page.tsx to prevent massive RPC congestion from blocking the rendering of cached local orders.
  • Real-time Pipeline Countdown for 4 Stages:
    • Refactored pipeline activeStep resolution logic to query the fast-polling issue.status instead of high-latency drawInfo endpoints.
    • Integrated precise timer readouts for all stages:
      • Stage 1 (Betting): Displays remaining time to close (⏳ HH:MM:SS).
      • Stage 2 (Consensus Draw): Tracks elapsed time since closing (🔄 +HH:MM:SS).
      • Stage 3 (Public Challenge): Queries the exact on-chain challengeDeadline, fallback to an optimistic clock when network fails.
      • Stage 4 (Settlement & Payout): Clearly displays ✅ Completed.

🚀 Sprint 24 [2026-05-28]: O(1) Ultra-fast SWAR Settlement & ERC-7201 Storage Alignments

  • O(49) to O(1) Settlement Optimization:
    • In DeSixTypes.sol, the uint8[] numbers array inside BetOrder was refactored into a highly compressed uint64 numberBitmap bitmap representation. Enforced ascending sorted numbers order checking (NumbersNotSorted) to keep data clean.
    • Replaced the O(49) nested loops in settleIssueBatch and voidIssueBatch with highly efficient SWAR popcount bitwise operations in inline Yul assembly, reducing time and space complexity to O(1) and eliminating Out-of-Gas risks.
  • ERC-7201 Storage Slot Compliance:
    • Corrected hardcoded storage magic numbers across 5 core contracts. Re-aligned slot derivations with their @custom:storage-location namespaces, paving the way for automated audits with OpenZeppelin Upgrades Tooling.

🚀 Sprint 23 [2026-05-27]: 31 Critical Contract Voids and Game Theory Vulnerabilities Patched

  • P0-1 LP Solvency Guard & Fee Collection:
    • Implemented the maxActiveIssueExposure() wind-tunnel simulation engine to enforce strict solvency checks inside withdrawLP. Principal withdrawals must not decrease LP equity below the maximum potential payout exposure of all active issues. Enforced a 0.20 USDC fixed treasury fee per withdrawal.
  • P1-1 & P1-2 & P1-3 Escape Hatch, Approved Allowance Voids, and PBKDF2:
    • Ported the 7-day emergencyWithdrawLP escape hatch to Parlay LP.
    • Restricted USDC.approve allowances inside ZeroDev policies using strict ParamCondition.LESS_THAN_OR_EQUAL rules.
    • Implemented 600,000-iteration PBKDF2-SHA256 password derivation in secure-storage.ts to secure encrypted local keys.
  • P2-1 & P2-12 Oracle Veto Reset and Min LP Lock:
    • Fixed a veto bug where disputeFrozen failed to reset; vetoing now automatically resets disputeFrozen to false to maintain dispute active.
    • Locked setOracleMinLPValue minimum at 1000 USDC (preventing cheap registrations), with a production override at 5000 USDC.
  • Low-Risk Fixes (P3-1~P3-9 & Info-1~Info-6): Covered startTime fairness, exposureLimitBps safety, optimized SLOAD usage in emergencyFinalize, new audit events (UserRewardAllocated, TokenMinted), and nonReentrant division guards.

🚀 Sprint 22 [2026-05-26]: DeSix Tokenomics and Mining Engine V2 Release

  • 66,000,000 Fixed Token Cap: Locked native token $DESIX total supply in DeSixToken.sol using a constant LIFETIME_MINT_CAP = 66,000,000. No inflation.
  • 11-Level Smooth K-Factor Wind Control: Implemented an 11-level smooth decay curve to deter riskless large-capital $DESIX token farming.
  • 15% Referral Mapping with 7-Day Linear Vesting: Referrers claim 15% of referee hashrate, distributed under a 7-day linear vesting schedule to smooth out selling pressure.
  • LP Staking Durations and Multiplier T: Tied staking periods to hashrate multipliers (Flexible 1.0x / 30-Day 1.3x / 90-Day 2.0x) to secure long-term capital.
  • 40/25/15/10/10 Fee Split: Adjusted protocol fee split to Operations 40%, Miner 25%, Buyback 15%, Treasury 10%, Perpetual Incentive 10% (USDC cashbacks to keep RTP high after year 5).

🚀 Sprint 21 [2026-05-26]: Batch Betting & Smart Session Keys Integration

  • placeBetBatch Optimization: Supported bundling up to 3 bets in a single atomic transaction, saving users up to 35% in gas.
  • Dynamic Dispute Stakes (getEffectiveDisputeStake): Upgraded dispute stakes from a flat 10 USDC to max(minDisputeStake, totalStake * 0.5%), deterring pool lockups by attackers.
  • Session Keys Silent Betting: Integrated ZeroDev Kernel V3.1 and ERC-7715 call policies to host a temporary local key limited to placeBet and approve.
  • IndexedDB Permanent Order Cache: Cached settled, immutable orders in IndexedDB, offloading memory limits from localStorage.
  • Dutch Auction Buyback & Burn: Replaced legacy buyback models with a Dutch Auction mechanism (linear decay from 2.0x to 0.5x historical prices). Global bots trigger swaps for a 1% $DESIX bounty, while 99% is burned automatically.

🚀 Sprint 20 [2026-05-22]: Multi-Repository Synchronization & Admin Runbook Releases

  • Fast-forward Main Merge: Safely merged fix/min-bet-gas-griefing into main.
  • Dual Remote Syncing: Synchronized codes across Github main and secondary backup hubs.
  • Dev & Ops Documentation: Compiled DEPLOYMENT_GUIDE.md (9-stage pipeline, multi-sig handoffs) and DEVELOPMENT.md (static resolution, bitmap collision rules, and public client multicall benchmarks).

📦 Historical Sprint Archive (Sprints 1 - 19)

Click to view early milestone archives
  • Sprint 19 [2026-05-22] - LP Solvency & Oracle Guards
    • Added a 1-hour WITHDRAWAL_WINDOW to prevent LP withdrawals during active draw runs.
    • Implemented Oracle LP Minimum Guard for 5,000 USDC stakes, adding defensive try/catch models.
    • Implemented hashrate slashing (slashOracleLPShares) to deter bad oracle mining yields.
    • Added a 0.20 USDC fixed fee to cover Paymaster gas sponsor costs.
  • Sprint 18 [2026-05-22] - Parlay Bets & Bitmap Mutex
    • Deployed DeSixParlay.sol to decouple parlay betting logic.
    • Implemented 49-bit uint64 bitmap check to prevent self-contradicting slips.
    • Supported 2~5 fold parlay odds multiplication with 3-Bucket isolation accounting.
  • Sprint 14 [2026-05-21] - Multicall & IndexedDB optimizations
    • Created SDK getOrdersBatch to bundle requests in a single public client multicall.
    • Intercepted RPC queries using IndexedDB for permanent final order caches, eliminating 429 errors.
  • Sprint 13 [2026-05-21] - Stage Decoupling & Gas Griefing Guards
    • Increased odds precision to 10,000. Decoupled consensus draw and settlement pipelines to prevent OOG.
    • Enforced minimum deposits (MIN_LP = 10 USDC, MIN_BET = 1 USDC, MIN_UNIT = 0.2 USDC) to block spam.
    • Added active DrawProgress charts, Web3 explanations, and glassmorphic BetSlip.
  • Sprint 12 [2026-05-18] - 5-Bucket reserves & Emergency Finalize
    • Refactored core ledger into lpEquity, payoutReserve, refundReserve, feeReserve.
    • Blocked LP discount exploits, and restored cursor-based settleIssueBatch.
  • Sprint 11 [2026-05-17] - Tokenomics Separation (Phase 1)
    • Decoupled contracts into DeSixCore, DrawManager, DeSixToken, and DeSixMiner.
    • Intertwined lpHashrate and tradeHashrate data channels for dual mining calculations.
  • Sprint 10 [2026-05-16] - Context Optimization & SWR
    • Cached React Context values to block excessive redraws.
    • Added a 5s hydration watchdog to bypass RPC blockages.
  • Sprint 9 [2026-05-16] - LP Pool lock visualizations
    • Added sorting batch cards for LPs and displayed profit distributions using pie charts.
    • Adjusted fee splits to 50/25/15/10 (Operations/Miner/Buyback/Treasury).
  • Sprint 8 [2026-05-16] - React Bundle Optimizations
    • Utilized React lazy-loading, dropping /me bundle size from 119KB to 11.8KB.
  • Sprint 7 [2026-05-15] - Base Sepolia E2E Transactions Passed
    • Successfully connected opening, betting, consensus draw, settlement, and payouts on-chain.
  • Sprint 6 [2026-05-15] - Transaction stability checks
    • Decoupled hash broadcast from receipt waiting to prevent duplicate transactions during RPC errors.
  • Sprint 5 - AA and Embedded Logins
    • Upgraded EntryPoint v0.7 + Kernel v3.1 structures. Added local key silent logins.

🔑 Key Configurations & Specs

Parameter / ConfigProduction SpecTestnet Spec (Base Sepolia)
Protocol VersionEntryPoint v0.7, Kernel v3.1EntryPoint v0.7, Kernel v3.1
Testnet ChainID-84532 (Base Sepolia)
DeSixCore0x6268b89Ea66dAAbf30b022447Ddae7997287E35f0xe911339e272EbbB08289538f5Efda3Ec8685f6d9
DrawManager0xd9DdC23DE8311Cde4673ae045920BCDD11ceB3570x12231047eed73c3Ba7379507F06549c408E05861
DeSixToken0xB79c240e1b1a0b8Bb2B4bdC82114545923826C500xf500f52C83AE4D4457b19d0D58c22C6afF9d0c1E
DeSixMiner0xB0B20dD1B1Ea0101DaDec25Da206EC05CF4563Ff0xB757f5265445571AE0C1BCfD91438B28f12273f8
DeSixBuybackGovernance pending0x6c982351eD3196571EE2cA6e87d54bA6BfC0fc4d
Mock USDC-0xd549d3Def57512dcFF045aF5a2EdB366c57529dc
Token Cap66,000,000 $DESIX66,000,000 $DESIX
Bets per Issue Limit3 times per address3 times per address
Minimum StakesMIN_LP = 10 USDC
MIN_BET = 1 USDC
MIN_UNIT = 0.2 USDC
Same as production spec
Protocol Fee Split40/25/15/10/10
(Operations/Miner/Buyback/Treasury/Cashbacks)
Same as production spec
Oracle Staking LimitoracleMinLPValue = 5000 USDCoracleMinLPValue = 1000 USDC (Contract Min)
Withdrawal WindowWITHDRAWAL_WINDOW = 1 hoursWITHDRAWAL_WINDOW = 300 seconds (5m for load tests)
Challenge Period24 Hours10 Minutes (Fast challenge resolution)
Dispute Stakemax(minDisputeStake, totalStake * 0.5%)Same as production spec
LP Time Multiplier TFlexible 1.0x / 30d 1.3x / 90d 2.0xSame as production spec

Running on Base Sepolia Testnet. Decentralized, transparent, and verifiable.