Skip to content

Repository files navigation

Anoma (XAN) Token

The Anoma token (XAN) is an upgradeable ERC-20 token.

This repository contains both implementations and the upgrade from V1 to V2. V1 gates upgrades with an in-token meta-governance mechanism based on quorum approval voting and a fast-track council. V2 removes the in-token governance in favor of a single owner, vests the formerly locked balances linearly, and adds ERC20Votes vote delegation on a timestamp clock. The V2 owner is an external governance stack — the XanGovernor DAO, its TimelockController, and the XanUpgradeCouncilModule backup upgrade path.

Conceptual orientation lives in CONTEXT.md. The audit-facing specifications are docs/01-XanV2-upgrade.md (token) and docs/02-XanV2-governance.md (governance layer); design decisions are recorded in docs/adr/.

Deployed Contracts

Contract Ethereum mainnet (Chain ID 1) Sepolia (Chain ID 11155111)
XAN token (ERC1967Proxy) 0xCEDbEA37C8872c4171259Cdfd5255CB8923Cf8e7 0xCEDbEA37C8872c4171259Cdfd5255CB8923Cf8e7
XAN V1 Implementation (XanV1) 0x03997b568FE70E91A53c458DC19dc29e0bC2735E 0x03997b568FE70E91A53c458DC19dc29e0bC2735E
XAN V2 Implementation (XanV2) 0x7dbE85cb696BD0C1499EF8124Ca8B65728803A07 0x7dbE85cb696BD0C1499EF8124Ca8B65728803A07
OZ Governor (XanGovernor) 0xe774470B7115242157a15841Bce246cf21335A83 0xe774470B7115242157a15841Bce246cf21335A83
Upgrade Council Module (XanUpgradeCouncilModule) 0x748C04a1C0762FBA0DB25346a41e55CC33F39461 0x748C04a1C0762FBA0DB25346a41e55CC33F39461
OZ Timelock (TimelockController) 0xcE935C8A47D4414eF2613d0786D65e1c91Ae3149 0xcE935C8A47D4414eF2613d0786D65e1c91Ae3149
Council multisig (SafeProxy) 0x0efb18adf9638495dBEE87b98b1e21cEE7bf1116 0x0efb18adf9638495dBEE87b98b1e21cEE7bf1116

The council multisig is V1's governanceCouncil, which schedules V1 upgrades and will also front the XanUpgradeCouncilModule after the upgrade. Both networks share the same addresses.

Audits

Anoma smart contracts undergo regular audits:

XanV1

  1. Zellic Audit

    📄 Audit Report (pdf)

  2. Informal Systems Audit

    📄 Initial Audit Report (pdf) 📄 Updated Audit Report (pdf)

XanV2

  1. Nethermind Audit

    📄 Audit Report (pdf)

Security

If you believe you've found a security issue, we encourage you to notify us via Email at security@anoma.foundation. Please do not use the issue tracker for security issues. We welcome working with you to resolve the issue promptly.

Setup

  1. Get an up-to-date version of Foundry with

    curl -L https://foundry.paradigm.xyz | bash
    foundryup
  2. Clone this repo and run

    forge install

Usage

Tests

forge test --force

Note

The --force flag is required for the openzeppelin-foundry-upgrades package to work.

Coverage

forge coverage

Linting & Static Analysis

As a prerequisite, install the

bunx --bun solhint --config .solhint.json 'src/**/*.sol' && \
bunx --bun solhint --config .solhint.other.json 'script/**/*.sol' 'test/**/*.sol' && \
slither .

About

The Anoma token contract written in Solidity

Resources

Stars

5 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages