Technical Whitepaper
Explore the infrastructure powering 3xtremes: a high-velocity, low-latency derivative market engine designed for extreme leverage up to 10,000x and transparent, cryptographically secure settlement.
Introduction
3xtremes operates as an on-chain trading platform built on the Arc Testnet. Unlike traditional order-book exchanges, it relies on a round-based settlement system. We condense market volatility into 60-second execution epochs, allowing users to leverage capital up to 10,000x on real-time simulated price feeds.
The 60-Second Epoch Loop
1. Initiation (T-60s)
The Keeper bot triggers the start of a round. A cryptographic seed is generated on-chain using block.prevrandao, block timestamp, block number, and round ID to ensure a deterministic and verifiable source of randomness.
2. Trading Window
From T-60s to T-5s, users can open Long or Short positions with massive leverage based on the real-time streamed prices.
3. Lock Window (T-5s)
In the final 5 seconds, all actions are frozen. No positions can be opened or closed, effectively eliminating front-running and latency arbitrage.
4. Settlement (T-0s)
The round concludes. The Keeper bot submits the final price derived from the on-chain seed, and all active positions are settled atomically by the smart contract.
Architecture & Bots
3xtremes utilizes an off-chain worker infrastructure to handle extreme frequencies without bloating the EVM gas state.
- Keeper Bot
The heartbeat of the system. It handles round lifecycles, streams pre-computed candles (derived from the on-chain seed) to the frontend via WebSocket, and synchronizes the current price on-chain every second.
- Liquidator Bot (Wick Detection)
An independent bot constantly scanning open positions. Crucially, it evaluates the High and Low of every candle tick - not just the Close. If a position hits -100% PnL, the bot liquidates it instantly on-chain, earning a 2% margin reward.
VRF Deterministic Engine
How do we ensure that the platform owners cannot manipulate the charts to liquidate users? The price candles are purely mathematical derivatives of an on-chain seed. The seed is generated from block.prevrandao combined with the block timestamp, block number, and round ID at the moment startRound() is called, making it publicly verifiable on-chain.
Candle Generation Algorithm
- XOR Hash: Every second evaluates a hash:
h = seed ^ (second * MAGIC_CONSTANT) - Global Drift & Noise: Introduces macro trends (±15) and micro volatility (±150 ticks per second).
- Mean Reversion Gravity: A 5% structural pull toward the starting price to prevent infinite spiraling.
- Volatility Tiers: Triggers random volatility spikes ranging from 0.01% up to 3.00% absolute deviation.
Because the algorithm is open-source and the seed is emitted on-chain via a smart contract event, any user can independently verify that the live chart matches the cryptographic seed exactly. The candle output is fully deterministic and publicly auditable, providing a high degree of transparency in market execution.
Vault Mechanics (USCC)
3xtremes operates using a highly optimized internal accounting system managed by the CreditVault smart contract. To interact with the trading engine, users must deposit USDC, which is then converted into USCC.
- The 1:1000 Exchange Rate
When depositing USDC (minimum 1 USDC), the vault credits the user with USCC at a 1:1000 ratio. This provides the necessary granularity to execute micro-margin trades at hyper-leverage levels without running into precision rounding errors.
- Not an ERC20 Token
USCC is not a transferable token. It is purely an internal state mapping within the
CreditVault. This means USCC cannot be sent to other wallets, traded on external DEXs, or viewed in MetaMask. It exists solely to optimize gas costs during the 60-second settlement loops. - The Withdrawal Guard
Security is paramount. The vault strictly prohibits any USDC withdrawals if the user has any active open positions (
openPositionCount > 0). This completely neutralizes flash-loan attacks or reentrancy exploits where an attacker might open a massive highly-leveraged position and immediately attempt to withdraw their underlying collateral before liquidation occurs.
Trading Mathematics
Absolute Liquidation
There are no margin calls. If your position hits -100% PnL, it is instantly seized. The formula is exact:
SHORT Liquidation = EntryPrice + (EntryPrice / Leverage)
At 10,000x leverage, a mere 0.01% price movement against your position results in immediate liquidation.
Protocol Economy
The financial stability of the platform relies on the FeeManager and the Insurance Fund.
- Trading Spread (0.01%)
A flat fee of 0.01% of the total SIZE (not margin) is charged upon opening and when closing in profit. Distribution: 30% Insurance Fund, 70% Protocol Revenue.
- Liquidation Distribution
When a position is liquidated, the margin is seized. 2% goes to the Liquidator Bot as a gas reward. The remaining 98% flows to the FeeManager, where 95% bolsters the Insurance Fund and 5% goes to the protocol.
- The Insurance Fund
Acts as the ultimate counter-party. If traders collectively win more than they lose in an epoch, the Insurance Fund covers the deficit, ensuring the protocol remains 100% solvent.
Security & Risk Limits
Operating high-leverage infrastructure requires uncompromising security constraints. We employ 6 layers of protection.
Epoch Locking (Anti-Snipe)
T-5s hard lock on the order book guarantees fairness by preventing late-stage algorithmic sniping.
OI Imbalance Cap
Global Open Interest skew is capped at 100M USCC to prevent systemic collapse during extreme one-sided betting.
Net Exposure Limit
Individual wallets are capped at ±100M USCC exposure to prevent massive hedge-drain attacks.
Withdrawal Guard
Users cannot withdraw USDC while any position is open, eliminating reentrancy and flash-loan vectors.