Smart Contracts
Overview
GX Exchange deploys 27 smart contracts across Arbitrum One and GX Chain, covering token infrastructure, staking, governance, bridging, lending, swapping, yield products, and marketplace functions. Every contract is immutable — no proxy patterns, no upgrade mechanisms, and no privileged admin roles. Once deployed, the code cannot be changed.
Contract Summary
| Contract | Category | Status |
|---|---|---|
| GXToken | Token & Distribution | Deployed & Verified — 0xA577...bf5F |
| GXAirdrop | Token & Distribution | Immutable |
| GXVesting | Token & Distribution | Deployed & Verified — 0x2859...887f |
| GXStaking | Staking & Governance | Deployed & Verified — 0x8e06...6517 |
| GXveToken | Staking & Governance | Deployed & Verified — 0x117B...Bdc1 |
| GXGovernor | Staking & Governance | Deployed & Verified — 0xC257...6D2d |
| GXTimelock | Staking & Governance | Deployed & Verified — 0xE6f0...86Ac |
| GXFeeDistributor | Staking & Governance | Immutable |
| GXVault | Bridge & Custody | Immutable |
| GXVaultV2 | Bridge & Custody | Immutable |
| GXBridge | Bridge & Custody | Immutable |
| GXUSD | Lending & Stablecoin | Immutable |
| GXStablecoin | Lending & Stablecoin | Immutable |
| GXLending | Lending & Stablecoin | Immutable |
| GXInsurance | Lending & Stablecoin | Immutable |
| GXSwapPair | DEX & Swap | Immutable |
| GXSwapFactory | DEX & Swap | Immutable |
| GXSwapRouter | DEX & Swap | Immutable |
| GXStableSwap | DEX & Swap | Immutable |
| GXYieldVault | Yield & Index | Immutable |
| GXIndex | Yield & Index | Immutable |
| GXIndexV2 | Yield & Index | Immutable |
| GXIndexFactory | Yield & Index | Immutable |
| GXSignalSubscription | Marketplace | Deployed & Verified — 0xA756...1F93 |
| GXBotSubscription | Marketplace | Deployed & Verified — 0x243e...4736 |
| GXTokenSale | Token & Distribution | Deployed & Verified — 0xd7E5...9AaF |
| GXPrediction | Marketplace | Immutable |
Token & Distribution
GXToken
ERC-20 governance and utility token with a fixed supply of 1,000,000,000 GX. No mint function exists after deployment. Supports permit (EIP-2612) for gasless approvals and on-chain burn tracking.
GXAirdrop
Merkle-tree airdrop contract allowing eligible addresses to claim GX tokens by submitting a valid Merkle proof. Claims expire after 90 days, after which unclaimed tokens are swept to the treasury. Gas-efficient packed bitmap for claim tracking.
GXVesting
Linear token vesting with configurable cliff periods. Team allocations vest over 3 years with a 1-year cliff. Investor allocations vest over 2 years with a 6-month cliff. Locked at deployment with no admin override.
Staking & Governance
GXStaking
Stake GX to earn dual rewards: USDC from protocol fee revenue and GX from emissions. Four staking tiers determine reward multipliers and governance weight. A 7-day cooldown period applies to all unstaking requests.
GXveToken
Vote-escrowed GX (veGX) locks tokens for 1 to 4 years, granting voting power that decays linearly toward zero at lock expiry. Longer locks yield proportionally greater governance influence and fee share. Non-transferable.
GXGovernor
On-chain governance contract enabling veGX holders to create proposals, vote, and execute protocol changes through the timelock. Supports standard, emergency, and parameter-change proposal types.
GXTimelock
Enforces a mandatory 48-hour delay between proposal approval and execution, giving the community time to review and exit if needed. The timelock is the sole executor for all governance actions.
GXFeeDistributor
Splits all protocol fee revenue into four immutable buckets: 40% to stakers, 20% burned permanently, 20% to the insurance fund, and 20% to the treasury. The split ratios are hardcoded with no setter function.
Bridge & Custody
GXVault
Multi-signature custody vault on Arbitrum One securing user deposits. Requires M-of-N operator signatures for any withdrawal. All findings from the independent Zellic security audit have been remediated.
GXVaultV2
Upgraded bridge vault replacing fixed multi-sig with a validator quorum model. Requires 2/3+ validator signatures for withdrawals and enforces a 24-hour dispute window before funds are released. Includes fraud-proof support and emergency pause.
GXBridge
Bridging contract for locking ERC-20 tokens on Arbitrum and releasing on GX Chain. Supports immutable token allowlists, dispute periods, and per-address rate limiting. Validator set requires 2/3+ stake-weighted multi-sig.
Lending & Stablecoin
GXUSD
Multi-collateral CDP (Collateralized Debt Position) stablecoin pegged to $1. Users deposit ETH or BTC as collateral and mint gxUSD against it. Minimum collateral ratio is 150%; positions below 130% are liquidated with a 5% bonus to liquidators. User-configurable interest rates between 1-10%.
GXStablecoin
Yield-bearing stablecoin backed by USDC. Users deposit USDC and receive gxUSD at the current exchange rate. The exchange rate grows as underlying USDC is deployed to GXYieldVault for yield generation. 6 decimals.
GXLending
Full-featured lending protocol supporting supply, borrow, and repay operations. Interest rates are set algorithmically based on pool utilization (base rate 2% + utilization-driven variable rate up to 20%). Positions are monitored by a health factor; those falling below 1.0 are eligible for liquidation. 10% protocol fee on interest.
GXInsurance
Insurance fund contract that absorbs protocol shortfalls from liquidation losses and bad debt. Funded by the 20% fee allocation from GXFeeDistributor, capped at $50M. Excess funds above the cap are redirected to the treasury.
DEX & Swap
GXSwapPair
Constant-product automated market maker implementing the x*y=k invariant. Each pair holds reserves of two tokens and charges a 0.3% swap fee. LP tokens are minted to liquidity providers.
GXSwapFactory
Permissionless factory contract that deploys new GXSwapPair instances using CREATE2 for deterministic addressing. Any user can create a new trading pair.
GXSwapRouter
Multi-hop swap router that finds optimal paths across multiple pairs and executes trades in a single transaction. Includes slippage protection and deadline enforcement.
GXStableSwap
AMM optimized for pegged assets such as gxUSD/USDC. Uses the StableSwap invariant to provide extremely low slippage on same-peg swaps — orders of magnitude better than constant-product for stable pairs. Configurable amplification parameter.
Yield & Index
GXYieldVault
ERC-4626 tokenized yield vault with a hardcoded fee structure: 2% management fee (annualized) and 20% performance fee on yield above high-water mark. Supports deposit caps and emergency withdrawal. First-depositor inflation protection built in.
GXIndex
On-chain crypto index token holding real underlying ERC-20 tokens in custody. Users deposit USDC, the contract buys the basket of component tokens, and mints index tokens. Monthly rebalancing by authorized rebalancer. Auditable on-chain holdings. 0.5% annual management fee, 0.1% mint/burn fees.
GXIndexV2
Enhanced index contract with Chainlink oracle integration for real-time NAV pricing and improved rebalancing logic.
GXIndexFactory
Factory contract for deploying independent GXIndex instances. Controlled by the GX Exchange multisig for creating new index products (GX10, GXDEFI, GXL1, GXAI, GXMEME, and more).
Marketplace
GXSignalSubscription
Signal provider copy-trading subscription marketplace. Anyone can register as a signal provider and set a monthly GX price. Subscribers pay GX tokens — 90% goes to the provider, 10% is permanently burned. 30-day subscription periods.
GXBotSubscription
Monthly subscription for GX trading bot tiers (Free, Starter, Pro). 50% of subscription payment is burned, 50% goes to the treasury.
GXPrediction
Binary prediction market where users buy YES/NO outcome tokens with USDC. Oracle reporters resolve markets, winners claim $1 per winning token. 2% fee on winnings. 30-day auto-expiry for unresolved markets.
Security Philosophy
Immutable by design. Every GX Exchange smart contract is deployed without proxy patterns, admin keys, or upgrade mechanisms. Once deployed, the bytecode cannot be changed by anyone — including the GX Exchange team. This eliminates the most common attack vector in DeFi: compromised admin keys.
Audited and tested. All contracts undergo internal security review and are open-source for public verification. The GXVault bridge contract has been independently audited by Zellic with all findings remediated.
Minimal attack surface. Contracts are purpose-built with the minimum functionality needed. No unnecessary features, no complex inheritance chains, no external dependencies beyond standard token interfaces.
Integer-only arithmetic. No floating point operations in any financial calculation. All math uses checked operations with overflow protection.