06 · TCG Miners documentation

Cycles, veins and the roll

Three ETH veins, a six-hour cycle, and a roll that pays 1/28 of each vein to whoever is working.

MintRevealDeckShiftsCycleClaim

The mine has three veins named after SPY, NVDA and SPCX. Each vein holds ETH. Every six hours the keeper rolls the cycle, and each vein pays 1/28 of its balance, about 3.57%, to the decks that worked, by weight. Every deck works all three veins at once. There is nothing to choose.

Before this page This page assumes a scheduled deck, from Shifts, bond and the cost of working. What you take out of it is on Claiming.

What it is #

A cycle is 21,600 s, six hours, four a day, set at deploy. Cycles are numbered from 1. The roll is the moment a cycle closes: the keeper posts the $CARDS price, each vein emits 1/28 of its balance into the working decks' accounts, and the cycle's cost is written against them. Then the next cycle starts.

The veins exist because the payout is tokenised stock, one vein per name. The odd part is that the veins themselves never hold stock. They hold ETH until claim, and the swap into stock happens then, one swap per vein.

Rules #

  • roll(cardsPriceWei) is keeper-only, callable after cycleEndTime, else CycleNotOver. The price must sit within 20% of the last price, else PriceOutOfBand.
  • If the keeper is silent for 2 hours past the end, anyone may call rollStale(), which rolls at the last price. Before that, NotStaleYet. The mine cannot be frozen by a silent keeper.
  • cycleEndTime advances by exactly 21,600 s from the previous end, not from the block that rolled, so late rolls do not shift the schedule and can be caught up back to back.
  • Each vein emits 1/28 of its current balance per roll, the same divisor for all three, split across working decks by one global weight.
  • If no deck is working, nothing is emitted and no cost accrues. The vein carries over.
  • The cycle's cost is computed in the same roll: the three emissions summed, times 15%, converted to $CARDS at the posted price, spread over cost weight. If only one-of-ones are working, the full 1/28 is emitted with zero burn.
  • fundPool(ticker) is payable and open to anyone. That is how ETH enters a vein. The keeper bot uses it on a schedule to forward the Pons creator fee it receives on $CARDS trades into the three veins; there is no ratio in the code.

Numbers #

Table 6.1 Cycle constants
ConstantValueSource
CYCLE_SECONDS21,600 s (set at deploy)MinePool.sol:73,​202; Deploy.s.sol:118
EMISSION_DIVISOR28 (1/28 per roll, about 3.57%)MinePool.sol
BURN_TARGET_BPS1,500 (15%)MinePool.sol
PRICE_BAND_BPS2,000 (20%)MinePool.sol:52,​372-375
STALE_AFTER2 hMinePool.sol:50,​380-384
VeinsSPY 0, NVDA 1, SPCX 2, fixed at 3IMinePool.sol:31-35; MinePool.sol:63
Table 6.2 An unrefilled vein of 1,000 ETH, worked every cycle (derived)
CycleBalance after roll
1964.29
2929.85
3896.64
4864.62
5833.74

A vein halves in about 19 cycles, 4.8 days, if nobody tops it up. A vein fed every cycle settles where the emission equals the inflow, at about 28 times what comes in per cycle. Source: MinePool.sol, derived.

Worked example #

Veins hold 10 / 5 / 15 ETH. Total weight is 1,000; deck B weighs 20.125.

emissions   0.357143 / 0.178571 / 0.535714 ETH   veins left at 9.642857 / 4.821429 / 14.464286
deck B      2.0125% of each                       0.007188 + 0.003594 + 0.010781 = 0.021563 ETH
cost        1.071429 ETH x 15% at 0.00000275      58,441.6 $CARDS mine-wide          (MinePool.sol)

Edge cases #

  • The price the keeper posts is the $CARDS/ETH rate used for the cost and for the required bond. It does not touch the ETH emitted; the swap into stock at claim is priced by the Renie pool, not by the keeper.
  • The owner can rotate the keeper, the router and the three stock addresses behind a 48 h timelock. The number of veins cannot change.
  • Amounts settle as decimals; dust stays in the vein.

Verify it on-chain #

  • currentCycle(), cycleEndTime(), totalWeight() and pool(ticker) show the live state.
  • lastCardsPrice() is the price the last roll used; keeper() is who may post the next one.
  • EMISSION_DIVISOR() returns 28 and has no setter.

Not in the game #

  • "SPY, NVDA, SPCX and more". Three veins, fixed in the bytecode.
  • "The vault pays stakers in stocks". There is no vault and nobody stakes. Three ETH veins pay working decks, and each vein's share becomes that vein's stock at claim.

Next #

Claiming: paid in tokenised stock.