Skip to content

Smart Contract Overview

The Atom Circuit Hub Contract is a CosmWasm smart contract deployed on Cosmos Hub. It manages the validator registry, fee attribution, ATOM staking, reward compounding, and rebalancing.

Contract

Configuration Parameters

These are set at instantiation and can be updated by the admin. Percentages are stored as basis points (10000 = 100%, so 50 = 0.50%).

Fee - 0.50% (50 basis points). This value is stored for reference and displayed on the frontend. The actual fee deduction happens through Skip Go's affiliate fee mechanism, not on-chain in this contract.

Min Stake Threshold - Minimum pending ATOM before delegation. Set to 0.5 ATOM.

Min Claim Threshold - Minimum accumulated staking rewards before claiming. Set to 0.1 ATOM.

Reward Split - Staking rewards are split three ways: 80% compound (restaked), 10% treasury, 10% operations. Configurable, all three must sum to 100%.

Operations Address - Receives the operations share of compounded staking rewards. Covers bot gas costs and infrastructure, making the protocol self-sustaining.

Treasury Address - Receives the treasury share of compounded staking rewards.

Jail Grace Period - How long to wait before rebalancing away from a jailed validator. Set to 24 hours (code default is 7 days, configurable via UpdateConfig).

Max Validators - Maximum number of registered validators. Set to 250.

Paused - When enabled, all operations are blocked except admin config changes.

Admin

The contract has a single admin address set at instantiation. Admin control can be transferred to a multisig or DAO via the two-step admin transfer process (ProposeAdmin, AcceptAdmin).

  • DeactivateValidator - deactivate a validator, redistributing its pending fees
  • ReactivateValidator - reactivate an admin-deactivated validator
  • RemoveValidator - permanently remove a deactivated validator from storage
  • Undelegate - undelegate ATOM from a validator (21-day unbonding)
  • ClearCompoundState - clear stuck compound pagination state
  • UpdateConfig - update contract configuration parameters
  • ProposeAdmin - propose a new admin address
  • AcceptAdmin - accept admin role (called by the proposed admin)

What Is Permissionless

Most operations do not require admin privileges:

  • RegisterValidator - anyone can register a bonded validator
  • ReactivateValidator - anyone can reactivate an auto-deactivated (not admin-deactivated) validator
  • ReceiveFees - anyone can send ATOM attributed to a referral
  • StakePending - anyone can trigger pending fee delegation
  • ClaimRewards - anyone can trigger reward claiming
  • CompoundRewards - anyone can trigger reward compounding
  • Rebalance - anyone can trigger jailed validator checks
  • Reconcile - anyone can trigger state reconciliation

This means if automated processing stops, anyone can call these operations directly. The only thing that stops is fee conversion from other chains (which requires the collector keys).

Validation Rules

  • Fee must be between 0 and 100% (0-10000 basis points)
  • Minimum stake threshold must be greater than zero
  • Compound + treasury + operations percentages must equal 100% (basis points must sum to 10000)
  • If operations percentage is greater than zero, an operations address must be set
  • Validator addresses must be valid cosmosvaloper1... addresses
  • ReceiveFees only accepts ATOM (uatom denomination)
  • Referral IDs are deterministic (derived from the valoper address) and cannot be chosen manually