05 · TCG Miners documentation

Shifts, bond and the cost of working

A deck earns only while it is scheduled. Shifts schedule it, the bond has to cover their estimated cost before they are sold, and the claim burns what they really cost.

MintRevealDeckShiftsCycleClaim

A bound deck earns nothing on its own. You buy shifts to put it to work, and you bond $CARDS so it can pay for them. The bond comes first: the mine will not sell a shift unless the deck's bond covers the estimated cost of the cycles you are buying. Each cycle the mine then charges every working deck a $CARDS cost, worth 15% of what the mine pays out that cycle, and burns it from the bond when you claim. If the estimate turns out short, the deck is clipped and retired.

Before this page This page assumes you have bound a deck and know its weight, from Decks and weight. The cycle itself is on Cycles, veins and the roll.

What it is #

A shift is one scheduled cycle of work. buyShifts(deckId, nCycles, cardsAmount) schedules nCycles cycles and pulls cardsAmount $CARDS into the deck's bond in the same call. The bond is not a fee. It is a prepaid balance the mine burns from as the deck works, and whatever is left comes back when you unbind.

The cost exists so that mining is never free. Every cycle the mine takes 15% of the value it pays out and destroys that much $CARDS, spread across working decks by cost weight. More decks working means each pays less and earns less. The market balances itself.

The bond is required up front so that nobody can dilute the mine on nothing. requiredBond(deckId, nCycles) estimates what the cycles you are buying will cost: the three vein balances summed and divided by 28 is one cycle's emission, 15% of that is the mine-wide cost, the deck's share of cost weight is its slice, the last posted $CARDS price turns that into $CARDS, and nCycles multiplies it. A passive deck also works the cycle it activates in, so from IDLE the estimate covers nCycles + 1; an active deck is charged for exactly nCycles. The purchase reverts BondBelowMinimum(required) unless the bond on the deck after the call is at least that much.

Rules #

  • Approve MinePool for $CARDS first. This is a second approval, separate from the mint one. The app asks once, for a max allowance.
  • nCycles is 1 or more. cardsAmount may be 0 when the bond already on the deck covers the requirement. The app always sends nCycles = 1.
  • A passive deck activated in cycle n works cycle n and the next nCycles, so one purchase is two cycles of work. An active deck is extended by exactly nCycles.
  • Weight enters the mine the moment you buy and leaves at the start of the cycle after endCycle. There is no time pro-rating; a deck activated one second before the roll earns the full cycle.
  • Nothing is burned at purchase, but the bond has to be there: the deck's bond after the call must cover requiredBond(deckId, nCycles) (from IDLE that is nCycles + 1 cycles), else the purchase reverts BondBelowMinimum(required). Cost accrues at each roll and is burned at claim.
  • Bond rule at claim. Cost 0: nothing burned. Bond at least cost: the cost is burned and the rest stays locked on the deck. Bond below cost: the whole bond is burned, you receive the fraction bond / cost of all three veins, the clipped part goes back to the veins, and the deck is retired.
  • A zero-bond deck is not possible. requiredBond is above zero whenever the veins hold ETH and the deck has cost weight, so a deck cannot be scheduled on nothing. The estimate can still run short, if the $CARDS price falls inside the band, the veins are topped up, or other decks leave, and then the claim rule above clips it. No bond, no payout.
  • unbindDeck works only when the deck is passive and fully claimed, else DeckStillActive or PendingNotSettled. Cards unlock and the remaining bond is refunded in full.
  • An active deck cannot be dissolved early. The exit is to stop buying shifts, let the schedule run out, claim, then unbind.
  • One-of-ones pay no cost. A deck made only of one-of-ones has cost weight 0, so its required bond is 0 and cardsAmount can be 0.

Numbers #

Table 5.1 Constants of the shift economy
ConstantValueMeaningSource
BURN_TARGET_BPS1,50015% of each cycle's ETH payout, burned as $CARDSMinePool.sol
EMISSION_DIVISOR28Each vein pays 1/28 of its balance per cycle; the base of the estimateMinePool.sol
Cost weightdeck weight without one-of-onesWhat the cost is spread overMinePool.sol:249,​258
Required bondrequiredBond(deckId, nCycles)Estimated cost of the cycles bought; the floor for buyShiftsMinePool.sol
Schedule stepnCyclesCycles added per purchaseMinePool.sol
Table 5.2 Bond rule at claim
Bond vs costBurnedPaidDeck afterSource
cost = 00fullunchangedMinePool.sol
bond >= costcostfull; remainder stays bondedunchangedMinePool.sol
bond < costwhole bondbond / cost of every vein; rest back to the veinsretiredMinePool.sol

Worked example #

Deck B has weight 20.125 in a mine of 1,000, at an example price of 0.00000275 ETH per $CARDS, with the veins at 10 / 5 / 15 ETH. One roll pays it 0.021563 ETH across the three veins.

required bond    1.071429 ETH x 15% x 0.020125 / 0.00000275 = 1,176.1 $CARDS per cycle
                 from IDLE (n + 1 cycles): requiredBond(B, 1) = 2,352.2; requiredBond(B, 4) = 5,880.5
                 while WORKING (n cycles): requiredBond(B, 1) = 1,176.1
mine-wide cost   1.071429 ETH emitted x 15% = 0.160714 ETH worth of $CARDS = 58,441.6 $CARDS
deck's share     58,441.6 x 0.020125 = 1,176.1 $CARDS
                 worth 0.003234 ETH, 15% of its 0.021563 ETH payout

claim, 3,000 $CARDS bonded    burn 1,176.1; 1,823.9 stays locked; receive 0.021563 ETH, paid as stock
claim, 1,000 $CARDS bonded    the estimate at purchase ran below the real cost
                              burn 1,000; fraction 1000 / 1176.1 = 0.8502
                              receive 0.018333 ETH as stock; 0.003229 ETH returns to the veins
                              deck retired                                        (MinePool.sol)

Edge cases #

  • Buying shifts for a retired deck starts a fresh schedule; the retirement only dropped the old one. The bond check applies again.
  • Two decks with the same cards are impossible; a bound card is locked in the NFT until unbind.
  • If the keeper is late, the roll still charges one cycle of cost per cycle worked, never more.
  • Leftover bond does not earn anything. It waits, and it counts toward the next purchase's requirement.
  • The estimate uses the vein balances and the price at the moment you buy. A vein funded after your purchase raises the real cost; a vein drained lowers it.

Verify it on-chain #

  • deckInfo(deckId) shows bondRemaining, endCycle, retired and the locked ids.
  • pendingOf(deckId) previews per-vein rewards, the pending cost and the pay fraction before you claim.
  • requiredBond(deckId, nCycles) returns the $CARDS the deck must hold to buy nCycles now.
  • BURN_TARGET_BPS() returns 1,500 and EMISSION_DIVISOR() returns 28. Neither has a setter.

Not in the game #

  • "Passive staking" and "no energy mechanics". Decks work scheduled shifts and burn $CARDS as they do.
  • "Unstaking is free and instant". Cards in a deck are locked until the schedule ends and the deck is claimed and unbound.
  • "Bond refunded at settle". The remainder stays on the deck and is refunded at unbind.
  • "Mine with an empty bond". A shift cannot be bought unless the bond covers its estimated cost.

Next #

Read this if you are here to... top up bond: buy another shift with the amount you want to add. Claim: Claiming. Free your cards: let the schedule end, claim, unbind. Understand the roll: Cycles, veins and the roll.