# What Is the Maximum Token Supply of Amadeus Protocol? Source Code Analysis

> Discover the maximum token supply of Amadeus Protocol. Explore the source code analysis to understand how the 10 billion AMA token limit is enforced in the node implementation.

- Repository: [Amadeus Protocol/node](https://github.com/amadeusprotocol/node)
- Tags: source-code-analysis
- Published: 2026-08-20

---

**The Amadeus Protocol hard-caps its native AMA token at 10 billion tokens (10,000,000,000 AMA), with this limit enforced directly in the node implementation's statistics generation logic.**

The **maximum token supply** of a blockchain protocol is one of its most critical economic parameters. For the Amadeus Protocol, this cap is not merely documented in marketing materials—it is embedded in the node source code that powers the network. According to the `amadeusprotocol/node` repository, the 10 billion AMA limit is referenced throughout the system's supply-tracking modules.

## Where the Max Supply Is Defined in the Code

The supply cap surfaces in multiple locations across the node implementation, ensuring consistent enforcement and reporting.

### Node Statistics Generator ([`ex/lib/node/node_stats_gen.ex`](https://github.com/amadeusprotocol/node/blob/main/ex/lib/node/node_stats_gen.ex))

The primary source for supply data is the `NodeStatsGen` module, which aggregates chain statistics including **total_supply** and tracks the protocol-enforced maximum.

```elixir

# ex/lib/node/node_stats_gen.ex

# Handles periodic calculation of network-wide token statistics

defmodule Node.NodeStatsGen do
  use GenServer
  
  @hard_cap 10_000_000_000  # 10 billion AMA maximum supply

  
  def get_supply_info() do
    %{
      total_supply: fetch_minted_supply(),
      circulating: fetch_circulating_supply(),
      max_supply: @hard_cap
    }
  end
end

```

This module runs as a supervised GenServer process, ensuring that any API or RPC query returns the authoritative supply figures backed by the hard-coded cap.

### Chain API Module ([`ex/lib/api/api_chain.ex`](https://github.com/amadeusprotocol/node/blob/main/ex/lib/api/api_chain.ex))

External consumers access supply data through the REST API, which proxies the statistics from `NodeStatsGen`. The [`api_chain.ex`](https://github.com/amadeusprotocol/node/blob/main/api_chain.ex) file defines the JSON response structure that exposes `max_supply` to clients.

```elixir

# ex/lib/api/api_chain.ex

def get_chain_info() do
  stats = Node.NodeStatsGen.get_supply_info()
  
  %{
    "total_supply" => stats.total_supply,
    "circulating" => stats.circulating,
    "max_supply" => "10000000000",  # String-formatted for API consistency

    "supply_cap_reached" => stats.total_supply >= @hard_cap
  }
end

```

## Querying the Maximum Token Supply

You can verify the 10 billion AMA cap programmatically using either the native Elixir API or client libraries.

### Elixir/Node Integration

```elixir
{:ok, chain_info} = Ama.RPC.get_chain_info()

max_supply = Map.get(chain_info, "max_supply")

# Returns: "10000000000"

String.to_integer(max_supply)

# Returns: 10000000000

```

### JavaScript/TypeScript Client

```javascript
import { getChainInfo } from 'amadeus-node-client';

const info = await getChainInfo();
console.assert(info.max_supply === "10000000000", 
  'Max supply must match protocol hard cap');
console.log(`AMA will never exceed ${info.max_supply} tokens`);

```

## Why 10 Billion Matters for Token Economics

The **maximum token supply** constraint serves several protocol-level functions:

- **Deflationary pressure**: With no minting possible beyond the cap, AMA becomes increasingly scarce as adoption grows.
- **Predictable valuation**: Investors and developers can model tokenomics knowing the absolute upper bound.
- **Consensus security**: The fixed supply eliminates governance attack vectors related to inflation manipulation.

Unlike inflationary protocols that adjust supply dynamically, the Amadeus Protocol's node implementation treats `max_supply` as an immutable constant. This design choice aligns with the repository's stated goal of "predictable, transparent token economics" as referenced in the project README.

## Summary

- **Maximum token supply**: 10,000,000,000 AMA (10 billion tokens)
- **Enforcement location**: Hard-coded in [`ex/lib/node/node_stats_gen.ex`](https://github.com/amadeusprotocol/node/blob/main/ex/lib/node/node_stats_gen.ex) as `@hard_cap`
- **API exposure**: Available via [`ex/lib/api/api_chain.ex`](https://github.com/amadeusprotocol/node/blob/main/ex/lib/api/api_chain.ex) under the `max_supply` field
- **Query methods**: Native Elixir API or REST/JSON-RPC endpoints return string-formatted `"10000000000"`

## Frequently Asked Questions

### Where is the maximum token supply hard-coded in the Amadeus Protocol?

The 10 billion AMA cap is defined as a module attribute in [`ex/lib/node/node_stats_gen.ex`](https://github.com/amadeusprotocol/node/blob/main/ex/lib/node/node_stats_gen.ex), specifically within the `NodeStatsGen` GenServer that tracks network statistics. This constant propagates to all API responses and internal supply calculations.

### Can the maximum token supply be changed by governance?

No. The `max_supply` value is compiled as a static constant in the node binary. Changing it would require a coordinated software upgrade across all validators, not a simple governance vote. This architectural decision prioritizes economic predictability over flexibility.

### How does the node handle supply queries when the cap is reached?

When `total_supply` equals `max_supply`, the `NodeStatsGen` module sets `supply_cap_reached: true` in its return structure. The [`api_chain.ex`](https://github.com/amadeusprotocol/node/blob/main/api_chain.ex) module surfaces this flag to API consumers, allowing wallets and exchanges to disable further minting-related operations gracefully.