Smart Contract Architecture

Smart contract design, interactions, and deployment architecture

Smart Contract Explorer β€” On-chain Architecture
Smart Contract Explorer β€” On-chain Architecture

Overview

VORTEX System Architecture

The VORTEX protocol consists of six core smart contracts that interact to form the complete ecosystem. All contracts are designed with security, transparency, and immutability as primary goals.

Contract Map

Contract Details

1. Token Contract

Property
Detail

Standard

ERC-20 (with custom tax logic)

Language

Solidity ^0.8.x

Key Features

Buy/sell tax, max wallet, max transaction, exemption list

Upgradeable

No β€” immutable after deployment

Admin Functions

None post-renouncement

Core Functions:

Tax Logic:

  • On buy/sell via DEX: 5% of transaction value is intercepted

  • Intercepted tokens are swapped to USDC via DEX router

  • USDC is forwarded to the Vortex Contract

  • Swap occurs when accumulated tax tokens exceed a threshold (gas optimization)

2. Staking Contract

Property
Detail

Standard

Custom (non-standard)

Key Features

Luck Score tracking, decay logic, tier calculation, streak tracking

Upgradeable

Proxy pattern for Luck formula adjustments (governance-controlled)

State

Mapping of address β†’ StakeInfo struct

Core Data Structure:

Key Functions:

Luck Calculation (at snapshot time):

3. Vortex Contract

Property
Detail

Standard

Custom

Key Features

Pot management, draw scheduling, payout logic, Pressure Mode

Upgradeable

No β€” immutable

Admin Functions

Emergency pause only (multi-sig)

Core Functions:

Draw Execution Flow:

4. Raffle Pass Contract

Property
Detail

Standard

ERC-1155 (multi-token)

Key Features

Tiered minting, pricing, burn-on-draw, metadata

Upgradeable

No

Token IDs by Tier:

Token ID
Tier
Price
Entries

1

Common

$5

1

2

Rare

$20

5

3

Epic

$75

20

4

Legendary

$250

75

5

Mythic

$1,000

350

Core Functions:

Property
Detail

Standard

VRFConsumerBaseV2Plus

Key Features

Random number requests, callback handling, request tracking

Network

Base Chainlink VRF V2.5

Integration:

6. Treasury (Multi-Sig)

Property
Detail

Type

Gnosis Safe multi-sig

Signers

3-of-5 configuration

Key Features

DeFi deployment, Hype Vault management, Drought Bonus distribution

The Treasury is not a custom smart contract but a Gnosis Safe multi-sig wallet that interacts with external DeFi protocols. Automated functions (Drought Bonuses, Hype Vault deployment) are handled by Chainlink Automation (Keepers) with parameters set by governance.

Contract Interaction Diagram

Deployment Plan

Phase
Contracts
Network

Testnet Alpha

All contracts

Base Testnet

Testnet Beta

All contracts + VRF integration

Base Testnet

Audit

All contracts submitted for audit

β€”

Mainnet Launch

All contracts deployed

Base Mainnet

Renouncement

Token contract ownership renounced

Base Mainnet

Gas Optimization

Optimization
Implementation

Batched tax swaps

Tax tokens accumulated and swapped in batches to reduce gas

Lazy Luck calculation

Luck Score computed at snapshot time, not on every block

ERC-1155 for passes

Multi-token standard reduces gas vs. separate ERC-721s

Minimal storage writes

Streak and mission data packed into single storage slots

Last updated