QUACDocs

Protocol

Monetary policy

This page explains exactly how QUAC is created: the rules, the formulas and the code. All numbers come from app/tokenomics.go.

Provisional. These parameters run on the devnet and the public testnet. Mainnet numbers will be published before launch. After launch they can change only by an on-chain governance vote.

Two sources of new QUAC

  1. Genesis allocation. Balances written into the genesis file before the first block (quacd genesis add-genesis-account). This sets the starting supply and who holds it.
  2. Block rewards. The x/mint module issues new uquac in every block. The x/distribution module then pays it out to validators and their delegators, in proportion to stake, after validator commission and the community-pool tax.

There is no other way to create QUAC. No account, including Dyber's, has permission to mint at will. The only module with the Minter permission is x/mint, and it follows the formula below.

Parameters

var (
    MaxSupplyQUAC = sdkmath.NewInt(1_000_000_000)

    InflationMin        = sdkmath.LegacyNewDecWithPrec(2, 2)  // 2% a year
    InflationMax        = sdkmath.LegacyNewDecWithPrec(8, 2)  // 8% a year
    InitialInflation    = sdkmath.LegacyNewDecWithPrec(5, 2)  // 5% a year at launch
    InflationRateChange = sdkmath.LegacyNewDecWithPrec(5, 2)  // max yearly move of the rate
    GoalBonded          = sdkmath.LegacyNewDecWithPrec(67, 2) // target staked share of supply

    BlocksPerYear = uint64(60 * 60 * 8766 / 5) // 6,311,520: 5-second blocks
)
Parameter Value Meaning
max_supply 1,000,000,000 QUAC (10¹⁵ uquac) Hard cap. Minting stops for good when total supply reaches it.
inflation_min 2% Floor on the annual inflation rate.
inflation_max 8% Ceiling on the annual inflation rate.
initial inflation 5% Where the rate starts at genesis.
inflation_rate_change 5% The most the rate can move in one year.
goal_bonded 67% The staked share of supply the policy aims for.
blocks_per_year 6,311,520 Converts annual issuance into per-block issuance. Assumes 5-second blocks.
mint_denom uquac The coin that is minted.

The formula, block by block

At the start of each block, x/mint runs these steps (Cosmos SDK x/mint, Minter.NextInflationRate and friends):

1. Measure staking.

bondedRatio = bonded tokens / total supply

2. Nudge the inflation rate toward the staking goal.

yearlyChange = (1 − bondedRatio / GoalBonded) × InflationRateChange
inflation    = inflation + yearlyChange / BlocksPerYear
inflation    = clamp(inflation, InflationMin, InflationMax)

When less than 67% of QUAC is staked, yearlyChange is positive: rewards rise to draw more staking. Above 67% it is negative. At most, the rate moves 5 percentage points over a full year of blocks, and it always stays between 2% and 8%.

3. Compute this block's issuance.

annualProvisions = inflation × total supply
blockProvision   = floor(annualProvisions / BlocksPerYear)

4. Apply the supply cap.

if total supply + blockProvision > MaxSupply:
    blockProvision = max(0, MaxSupply − total supply)

5. Mint and pay out. The minted coins go to the fee collector, together with the block's transaction fees. x/distribution then splits them among validators and delegators.

Worked example (devnet)

The devnet starts with 101,000,000 QUAC at 5% inflation:

annualProvisions = 0.05 × 101,000,000 QUAC = 5,050,000 QUAC
blockProvision   = 5,050,000 / 6,311,520   ≈ 0.80012 QUAC  (800,124 uquac)

That matches the first devnet block exactly: the supply went from 101000000000000 to 101000000800124 uquac.

How long until the cap?

Supply compounds at the inflation rate, so the cap is reached in roughly ln(cap / supply) / ln(1 + rate) years. Starting from the testnet's 400,000,000 QUAC:

If inflation sat at Years to 1,000,000,000 QUAC
8% (ceiling) about 12
5% about 19
2% (floor) about 46

The real path depends on staking behavior, because the rate moves within its band.

Block time matters

BlocksPerYear turns an annual rate into a per-block amount. If blocks are actually faster than 5 seconds, real annual issuance runs above the stated rate, and slower blocks mean less. The testnet's timeout_commit is 5 seconds and blocks land about every 5.3 seconds, so issuance runs slightly (about 6%) below the nominal rate. The devnet uses 1-second blocks for convenience, so its issuance runs about five times faster than the nominal rate.

How the policy reaches genesis

Most Cosmos chains set mint parameters by editing genesis.json after init. QUAC builds them into the default genesis, so quacd init and the in-process test networks start with QUAC's policy without any extra step.

It does this by overriding two modules' DefaultGenesis in app/tokenomics.go:

// quacMintBasic replaces x/mint's default genesis with QUAC's policy.
type quacMintBasic struct{ mint.AppModuleBasic }

func (quacMintBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
    return cdc.MustMarshalJSON(QuacMintGenesis())
}

// quacBankBasic adds QUAC denom metadata to x/bank's default genesis.
type quacBankBasic struct{ bank.AppModuleBasic }

func (b quacBankBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
    var gen banktypes.GenesisState
    cdc.MustUnmarshalJSON(b.AppModuleBasic.DefaultGenesis(cdc), &gen)
    gen.DenomMetadata = []banktypes.Metadata{QuacDenomMetadata()}
    return cdc.MustMarshalJSON(&gen)
}

app/app.go registers them when it builds the basic module manager:

minttypes.ModuleName: quacMintBasic{app.ModuleManager.Modules[minttypes.ModuleName].(mint.AppModule).AppModuleBasic},
banktypes.ModuleName: quacBankBasic{app.ModuleManager.Modules[banktypes.ModuleName].(bank.AppModule).AppModuleBasic},

Embedding the original AppModuleBasic keeps every other method (codec registration, genesis validation, CLI) unchanged. Only the default genesis differs.

The staking bond denom, the mint denom, governance deposits and the key-rotation fee all default to sdk.DefaultBondDenom. app/config.go sets that to uquac before any module reads it:

func init() {
    sdk.DefaultBondDenom = BaseDenom // "uquac"
    // ... bech32 prefixes, see Accounts and transactions
}

Coin metadata

Wallets and explorers learn how to display QUAC from the bank module's denomination metadata:

banktypes.Metadata{
    Description: "The native coin of the Dyber QUAC post-quantum chain.",
    DenomUnits: []*banktypes.DenomUnit{
        {Denom: "uquac", Exponent: 0, Aliases: []string{"microquac"}},
        {Denom: "QUAC", Exponent: 6},
    },
    Base:    "uquac",
    Display: "QUAC",
    Name:    "Dyber QUAC",
    Symbol:  "QUAC",
    URI:     "https://quantcoin.world/brand/quac-icon.png",
}

Testnet allocation

quac-testnet-1 started with 400,000,000 test QUAC:

Holder Balance Staked
Validator quac-val-0 100,000,000 30,000,000
Validator quac-val-1 100,000,000 30,000,000
Validator quac-val-2 100,000,000 30,000,000
Faucet 100,000,000 —

After launch, quac-val-1 sent 30,010,000 of its unstaked QUAC to a fourth validator, quac-val-3, which staked 30,000,000. Total supply didn't change; the four validators now have equal voting power.

Testnet QUAC has no value, and the testnet may be reset with a new allocation.

Changing the policy

All mint parameters are module parameters, so a governance proposal can change them with a MsgUpdateParams to x/mint, signed by the governance module account. The supply cap is one of those parameters. Raising it would need a successful governance vote, and QUAC intends to treat the mainnet cap as permanent.

Edit this page on GitHub