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,
_voidIssueBatchInternalused 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 stakeissue.totalStakefrom the LP net equitylpEquityto the refund reserverefundReserve. Consequently, players callingclaimRefunddirectly drained funds fromlpEquity, placing LP funds at direct risk of arbitrage or runs and distorting the true value returned bygetTVL(). - Fixes:
- In
DeSixCore.sol's_voidIssueBatchInternal, the total stakeissue.totalStakeis now automatically deducted from$.lpEquityand deposited in full into$.refundReserveat the exact moment of voiding, achieving complete physical reserve separation. - Refactored
claimRefundto eliminate legacy execution paths drawing fromlpEquity; all refund operations are now strictly paid out from$.refundReserve, while preserving the standard hashrate slashing/reversal logic.
- In
- Analysis: In previous designs,
- P0-2 Recover Expired Claims & Refunds (recoverExpiredClaims Implementation):
- Analysis: Although errors for expired claims were declared in the contracts, the actual recovery functions (
announceClaimRecoveryandrecoverExpiredClaims) 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 frompayoutReserveorrefundReserveback tolpEquity.
- Integrated and adapted
- Analysis: Although errors for expired claims were declared in the contracts, the actual recovery functions (
- White-listed Selector Fix for Test Suite:
- Fixes: Explicitly registered a mock swap selector
0x12345678indutch-auction-buyback.test.ts'sbeforeEachhook. This resolved test failures caused by the recently added safety whitelist checking on swaps, restoring 7 passing Dutch auction integration tests.
- Fixes: Explicitly registered a mock swap selector
🚀 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
BetExpirederror. However, during theeth_estimateGasphase, 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'已截止'alongsideBetExpired(or0xf41de086) to ensure a correct "Betting closed - please wait for the next issue" toast is 100% shown.
- Optimized the gas revert fallback logic in the SDK's
- Analysis: When betting is close to deadline or closed, user bets are rejected with a
- Remote Synchronization:
- Committed and pushed all translation corrections, latency-free
DrawProgressrefactorings,contract-service-draw.tscache optimizations, anddiagnose-oracles.tsdebug suites to the remote main branch.
- Committed and pushed all translation corrections, latency-free
🚀 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
loadingstate ofDrawProgresstofalse, 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
syncWeb3Orderson mount inorders/page.tsxto prevent massive RPC congestion from blocking the rendering of cached local orders.
- Eliminated the 8-second loading lag on the orders page. Set the initial
- Real-time Pipeline Countdown for 4 Stages:
- Refactored pipeline
activeStepresolution logic to query the fast-pollingissue.statusinstead of high-latencydrawInfoendpoints. - 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.
- Stage 1 (Betting): Displays remaining time to close (
- Refactored pipeline
🚀 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, theuint8[] numbersarray insideBetOrderwas refactored into a highly compresseduint64 numberBitmapbitmap representation. Enforced ascending sorted numbers order checking (NumbersNotSorted) to keep data clean. - Replaced the O(49) nested loops in
settleIssueBatchandvoidIssueBatchwith highly efficient SWARpopcountbitwise operations in inline Yul assembly, reducing time and space complexity to O(1) and eliminating Out-of-Gas risks.
- In
- ERC-7201 Storage Slot Compliance:
- Corrected hardcoded storage magic numbers across 5 core contracts. Re-aligned slot derivations with their
@custom:storage-locationnamespaces, paving the way for automated audits with OpenZeppelin Upgrades Tooling.
- Corrected hardcoded storage magic numbers across 5 core contracts. Re-aligned slot derivations with their
🚀 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 insidewithdrawLP. Principal withdrawals must not decrease LP equity below the maximum potential payout exposure of all active issues. Enforced a0.20 USDCfixed treasury fee per withdrawal.
- Implemented the
- P1-1 & P1-2 & P1-3 Escape Hatch, Approved Allowance Voids, and PBKDF2:
- Ported the 7-day
emergencyWithdrawLPescape hatch to Parlay LP. - Restricted
USDC.approveallowances inside ZeroDev policies using strictParamCondition.LESS_THAN_OR_EQUALrules. - Implemented 600,000-iteration PBKDF2-SHA256 password derivation in
secure-storage.tsto secure encrypted local keys.
- Ported the 7-day
- P2-1 & P2-12 Oracle Veto Reset and Min LP Lock:
- Fixed a veto bug where
disputeFrozenfailed to reset; vetoing now automatically resetsdisputeFrozentofalseto maintain dispute active. - Locked
setOracleMinLPValueminimum at1000 USDC(preventing cheap registrations), with a production override at5000 USDC.
- Fixed a veto bug where
- 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), andnonReentrantdivision 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.solusing a constantLIFETIME_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 tomax(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
placeBetandapprove. - 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-griefingintomain. - 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) andDEVELOPMENT.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_WINDOWto prevent LP withdrawals during active draw runs. - Implemented
Oracle LP Minimum Guardfor 5,000 USDC stakes, adding defensive try/catch models. - Implemented hashrate slashing (
slashOracleLPShares) to deter bad oracle mining yields. - Added a
0.20 USDCfixed fee to cover Paymaster gas sponsor costs.
- Added a 1-hour
- Sprint 18 [2026-05-22] - Parlay Bets & Bitmap Mutex
- Deployed
DeSixParlay.solto decouple parlay betting logic. - Implemented 49-bit
uint64bitmap check to prevent self-contradicting slips. - Supported 2~5 fold parlay odds multiplication with 3-Bucket isolation accounting.
- Deployed
- Sprint 14 [2026-05-21] - Multicall & IndexedDB optimizations
- Created SDK
getOrdersBatchto bundle requests in a single public client multicall. - Intercepted RPC queries using IndexedDB for permanent final order caches, eliminating 429 errors.
- Created SDK
- 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
/mebundle size from 119KB to 11.8KB.
- Utilized React lazy-loading, dropping
- 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 / Config | Production Spec | Testnet Spec (Base Sepolia) |
|---|---|---|
| Protocol Version | EntryPoint v0.7, Kernel v3.1 | EntryPoint v0.7, Kernel v3.1 |
| Testnet ChainID | - | 84532 (Base Sepolia) |
| DeSixCore | 0x6268b89Ea66dAAbf30b022447Ddae7997287E35f | 0xe911339e272EbbB08289538f5Efda3Ec8685f6d9 |
| DrawManager | 0xd9DdC23DE8311Cde4673ae045920BCDD11ceB357 | 0x12231047eed73c3Ba7379507F06549c408E05861 |
| DeSixToken | 0xB79c240e1b1a0b8Bb2B4bdC82114545923826C50 | 0xf500f52C83AE4D4457b19d0D58c22C6afF9d0c1E |
| DeSixMiner | 0xB0B20dD1B1Ea0101DaDec25Da206EC05CF4563Ff | 0xB757f5265445571AE0C1BCfD91438B28f12273f8 |
| DeSixBuyback | Governance pending | 0x6c982351eD3196571EE2cA6e87d54bA6BfC0fc4d |
| Mock USDC | - | 0xd549d3Def57512dcFF045aF5a2EdB366c57529dc |
| Token Cap | 66,000,000 $DESIX | 66,000,000 $DESIX |
| Bets per Issue Limit | 3 times per address | 3 times per address |
| Minimum Stakes | MIN_LP = 10 USDCMIN_BET = 1 USDCMIN_UNIT = 0.2 USDC | Same as production spec |
| Protocol Fee Split | 40/25/15/10/10 (Operations/Miner/Buyback/Treasury/Cashbacks) | Same as production spec |
| Oracle Staking Limit | oracleMinLPValue = 5000 USDC | oracleMinLPValue = 1000 USDC (Contract Min) |
| Withdrawal Window | WITHDRAWAL_WINDOW = 1 hours | WITHDRAWAL_WINDOW = 300 seconds (5m for load tests) |
| Challenge Period | 24 Hours | 10 Minutes (Fast challenge resolution) |
| Dispute Stake | max(minDisputeStake, totalStake * 0.5%) | Same as production spec |
| LP Time Multiplier T | Flexible 1.0x / 30d 1.3x / 90d 2.0x | Same as production spec |