Ksana
中文

Concepts

KSA, rewards and fees

KSA is Ksana’s built-in token. It pays path B fees and rewards the producers who make blocks and land their data on Bitcoin. On mainnet all of it is issued as block rewards on a fixed schedule, capped at 210,000,000 KSA.

On this page

KSA is a built-in asset of Ksana’s virtual machine, not a contract: its name is KSA, its asset ID is 32 zero bytes, and it has 8 decimals. Amounts are whole numbers of base units, and 1 KSA is 100,000,000 base units. You need KSA for path B fees; path C uses bitcoin alone (Operations and fees).

Shell
export KSANA_RPC=https://signet.ksana.network/rpc
ksana-cli --chain signet asset
Output
{
  "asset": "0000000000000000000000000000000000000000000000000000000000000000",
  "at": {
    "hash": "2c1363cf56e91f58e8bd2167b74625120771ad3b0956ea215de540faa33df3ad",
    "height": "286"
  },
  "decimals": 8,
  "issuer": "0000000000000000000000000000000000000000000000000000000000000000",
  "name": "KSA",
  "total_supply": "11011956230000000"
}

On the signet that total is 110,119,562.3 KSA: the 110,000,000 KSA of its genesis allocations plus the rewards paid so far. Signet KSA has no value, and mainnet has not launched.

Supply and issuance

KSA issued, millions

050100150200010203040

Years after launch

  • KSA issued
  • Halving
  • Cap, 210 million

KSA issued over the first 40 years of mainnet: the halvings and the 210,000,000 KSA cap.

New KSA comes into existence only as block rewards. On mainnet the cap is 210,000,000 KSA (KSA_MAX_SUPPLY), there is no genesis allocation, and the reward schedule adds up to the cap: every slot of every period together pays 209,999,996 KSA, 4 KSA short because integer halving rounds down. The cap is also enforced when rewards are paid, so the total supply can never pass it.

Reward slots

Rewards follow the DAA score, which grows by each block’s weight and advances one unit per 5 seconds on target. A block with entries has weight 1; an empty block has weight 12 to 120 (Mining explains why). A block of weight w takes w reward slots, the w DAA scores up to its own, and each slot pays the reward of its halving period: 4.2 KSA in mainnet’s first period. Empty and non-empty blocks therefore earn the same per unit of time, so producers gain nothing by making empty blocks on purpose, or by breaking a run of them.

The main-chain block and the blue blocks it merges are rewarded. Red blocks, the ones GHOSTDAG judges to have stayed out of sight too long, get no block reward, though the path B fees in them are still paid.

Halving periods

The reward per slot halves at the end of each period. On mainnet a period is twice as long as the one before at each of the first two halvings, and from then on every period lasts 8 years:

Period About KSA per slot Issued by its end
0 Years 0 to 2 4.2 52,500,000 (25%)
1 Years 2 to 6 2.1 105,000,000 (50%)
2 Years 6 to 14 1.05 157,500,000 (75%)
3 Years 14 to 22 0.525 183,750,000 (87.5%)
4 Years 22 to 30 0.2625 196,875,000 (93.75%)
5 to 28 8 years each Half the period before 209,999,996 (about 100%)

Periods are counted in DAA score (12,500,000, then 25,000,000, then 50,000,000 each), so the years assume the 5-second target. The last base unit is paid in period 28, and from DAA score 1,387,500,000, about 220 years in, the reward is zero.

The signet and devnet use other values: 9.9 KSA per slot, periods of 25,228,800 DAA score (about 4 years) that all have the same length, and a cap of 1,000,000,000 KSA, which leaves room for test allocations. Parameters lists every value.

Who gets each slot

Each slot is paid when its block unlocks. The block’s carrier gets 5% of it, 0.21 KSA in mainnet’s first period and 0.495 KSA on the signet, and the producer gets the rest, apart from the block share that slots carry while the protocol’s rules set one, paid to the account the genesis config names. When the block has no carrier, or its producer is its carrier, the producer keeps the carrier’s part too. If a payout runs into the cap, the block share is paid first, then the carrier, and the producer takes what remains.

The carrier

The carrier of a block is whoever first landed its data on Bitcoin. For a settlement, that is the producer of the block that carried it; for a republish, the payee it names, but only when the data lands more than ANCHOR_DEPTH + 2 Bitcoin blocks above the block’s anchor (more than 3 on the signet, more than 4 on mainnet), so that nobody earns by racing to land data that its own producer was about to land. The carrier gets 5% of each slot of the block (CARRIER_BPS) and half of the block’s path B fees (CARRIER_FEE_BPS).

Landing other blocks’ data costs bitcoin, and the carrier reward pays for it: that is what lets one settlement per Bitcoin block carry the data of many blocks. In mainnet’s first period, carriers together earn at most about 3,629 KSA a day from rewards. A rescue copies the original payload, so the original carrier keeps the reward and the rescuer pays without income.

Rewards and path B fees are not credited when a block is made. They are paid at unlock: a later main-chain block carries an unlock entry that pays everything up to some position, and it may reach a block only once the data of that block and of every block before it is on Bitcoin. Until then they show under locked_fees in ksana_getAccount. Here is a signet producer’s list:

Shell
ksana-cli --chain signet account tb1penqxc08g69mt8sgp8rw5uuy88yu6n3kuq4vh73d2ec28aukq057s0vh4h2 \
  | jq '.locked_fees[0:4]'
Output
[
  {
    "amount": "594000000",
    "block_hash": "ca81971355fdbae2693c4fe0b8a31670c5c410314524fd9e01dbd97aa01b5fe2"
  },
  {
    "amount": "1188000000",
    "block_hash": "792fd0dbb60d85f8195326e0ac83847c10d031ccb8b225a6fa64f3764289fee2"
  },
  {
    "amount": "38016000000",
    "block_hash": "d18e91c9383400d27166695177decadb89399456e55d79eb6e6164d625edaf95"
  },
  {
    "amount": "76032000000",
    "block_hash": "76ed3966dec4ddcd40fe31a777add64381a75b0daef81be1780549cf86e5bf7a"
  }
]

The last two are empty blocks this producer made, of weight 48 and 96, so they pay 48 and 96 slots: the producer’s share together with the carrier’s, because it landed their data itself or nobody has landed it yet. The first two are its carrier’s 5% of other producers’ blocks: 12 and 24 slots at 0.495 KSA. The node projects these amounts from the current chains, so one can still change, for example when another producer’s settlement lands a block’s data first.

Paying only after the data is on Bitcoin makes producers want every block’s data landed, their own and everyone else’s: one block with missing data holds back the income of every block after it.

Where fees go

  • Path B fees (KSA): taken from you before the operation runs, locked with the block, and paid at unlock, half to the block’s carrier and half to its producer (all to the producer when it carried its own block or nobody qualifies as carrier).
  • Bitcoin fees for settlements: paid in BTC by whoever lands the data, usually the producer whose block carries the settlement. Producers earn KSA and pay bitcoin; an exchange contract lets them sell KSA for bitcoin.
  • Path C fees: paid in BTC to Bitcoin miners only. Producers receive no fee for them.

Nothing is burned: fees go to producers and carriers in full. A contract can burn KSA it holds with asset_burn, which lowers the total supply.

Genesis

Network Genesis allocation Block share account
mainnet None: the rewards alone reach the cap A placeholder that no node accepts, to be filled in before launch
signet 100,000,000 KSA to the faucet, 10,000,000 KSA to the operator Set in signet/genesis.json
devnet 10,000 KSA to a test account, written by devnet/init.sh A generated account

On mainnet no KSA exists before the first block, and every KSA after it is a block reward. The full rules are in SPEC §8.5 (unlocking) and §8.6 (KSA and block rewards).