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) 0xC2030d64f0C24D6033Fa1ef03D7A2F58800aa00b 0xC2030d64f0C24D6033Fa1ef03D7A2F58800aa00b
OZ Governor (XanGovernor) 0x785A5dd3A9Ca66fe4a447833c2dC782000829A30 0x785A5dd3A9Ca66fe4a447833c2dC782000829A30
Upgrade Council Module (XanUpgradeCouncilModule) 0xba197Fc10009f273E7453553831cd30a0dc9551A 0xba197Fc10009f273E7453553831cd30a0dc9551A
OZ Timelock (TimelockController) 0xD8d0ec5Ddd008aD401b912c4f3Fb989B73C84dDb 0xD8d0ec5Ddd008aD401b912c4f3Fb989B73C84dDb
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