Skip to content

System Overview

Atom Circuit collects swap fees and stakes them as ATOM to Cosmos Hub validators. Here is how the system works end to end.

Swap Flow

When a user swaps tokens, the fee is collected and linked to a validator.

graph LR
    User[User] -->|swap| Frontend[Atom Circuit]
    Frontend -->|route via| SkipGo[Skip Go]
    SkipGo -->|0.50% fee| Collector[Fee Collection]
    Frontend -->|record referral| Referral[Referral Tracking]

Swaps are routed through Skip Go, a cross-chain swap aggregator that finds the best route across DEXes and bridges.

Fee Processing

Collected fees are converted to ATOM approximately every 30 minutes and delivered to the staking contract on Cosmos Hub.

graph LR
    Collector[Collected Fees] -->|convert to ATOM| Contract[Staking Contract]
    Contract -->|delegate| Staking[Cosmos Hub Staking]

Contract Operations

The staking contract handles delegation, compounding, and rebalancing.

graph LR
    Contract[Staking Contract] -->|delegate / redelegate| Staking[Cosmos Hub Staking]
    Contract -->|10% of rewards| Treasury
    Contract -->|10% of rewards| Operations

Key Concepts

Every registered validator gets a unique referral link. Validators can also have human-readable vanity slugs (e.g., /swap?ref=cosmostation). When a user swaps through a referral link, the fee is attributed to that validator.

Swaps without a referral link go to the general pool, which is distributed equally to all active validators.

Referral Tracking

After each swap, the system records which validator's referral link the user came through. Each swap is verified, then fees are distributed to the staking contract.

Staking and Compounding

The contract delegates ATOM to validators through the Cosmos Hub staking system. Staking rewards are claimed approximately every 30 minutes and split three ways: 80% is restaked to validators proportionally to their existing delegations, 10% goes to the project treasury, and 10% goes to operations (covering bot gas costs and infrastructure). This makes the protocol self-sustaining.

Self-Balancing

Compound rewards are restaked proportionally to each validator's existing delegation size. When rescuing stake from a jailed validator, the contract spreads it across the 3 smallest active validators. This naturally rotates which validators receive rescued stake, keeping delegations from becoming too concentrated.