Skip to content

Repository files navigation

Anoma (XAN) Token

The Anoma token (XAN) is the foundation of the Anoma Economic System. It is an upgradeable ERC-20 token.

The currently deployed V1 implementation gates upgrades with an in-token meta-governance mechanism based on quorum approval voting and a fast-track council. This repository also contains the V2 implementation and the V1→V2 upgrade: 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/.

Audits

Anoma smart contracts undergo regular audits:

  1. Zellic Audit

    📄 Audit Report (pdf)

  2. Informal Systems Audit

    📄 Initial Audit Report (pdf) 📄 Updated 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

Run

forge test --force --gas-report

Note

The --force flag is required for the openzeppelin-foundry-upgrades package to work. The --gas-report flag prints selected gas reports.

Coverage

Run

forge coverage --ir-minimum

Linting & Static Analysis

As a prerequisite, install the

Run the linter and analysis with

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

Documentation

Run

forge doc

About

The Anoma token contract written in Solidity

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages