04 · TCG Miners documentation

Decks and weight

Decks and weight revised: all 6 fact-check gaps and all 26 voice items applied, figures and tables renumbered in page order, prose cut from 1,001 to 867 words; the 600 +-15% ceiling is not reachable w

Get $CARDSMintRevealDeckBond and shiftsCycle payoutsClaim (Merge returns to Deck)

A deck is 1 to 128 of your cards bound as one unit. MinePool computes its weight once from tier, stars and a per-element set bonus, locks every card, and the deck is born passive. That weight is its share of every vein, every cycle.

Before this page Your cards are revealed, so you know their tier and stars; see Sealed cards. Every constant here has a row in Reference.

What it is #

A deck is an ordered list of 1 to 128 of your cards, bound in one call to bindDeck(cardIds). The mine treats it as one worker with one weight, one lock and one claim, so the roll moves accumulators and never walks decks (contracts/interfaces/IMinePool.sol:24-26).

Every deck mines all three veins at once (contracts/src/MinePool.sol:261). Binding needs no $CARDS.

The deck is born passive, endCycle set to currentCycle - 1, and earns nothing until you buy a shift (MinePool.sol:267-268). The contract answers with DeckBound(owner, deckId, weight, costWeight) (MinePool.sol:279). The name you type stays in the app; only the card ids go on-chain (app/web/src/app/deck/DeckApp.tsx:204-205).

Rules #

  • bindDeck needs reveal, else NotRevealedYet, and is frozen by pause, else EnforcedPause (MinePool.sol:214-215).
  • It takes 1 to 128 cards, else EmptyDeck or DeckTooLarge (MinePool.sol:216-218).
  • Each card must be yours and in no deck, else CardUnavailable; a duplicated id fails the same way (MinePool.sol:233-237).
  • MinersNFT locks every card at bind and unlocks it only at unbind (MinePool.sol:275-277,351-354). Every transfer or burn of a locked card reverts; only mint is exempt (contracts/src/MinersNFT.sol:488-494). The odd part is that a passive deck stays locked. Until you unbind, a card cannot be transferred, sold, burned or merged, else CardLocked (MinersNFT.sol:323-324,492). Approvals can still be set; the transfer itself reverts.
  • Only MinePool toggles the lock; its address was set once at deploy and cannot be set again (MinersNFT.sol:458-464,472-481; contracts/script/Deploy.s.sol:126).
  • Weight is computed once at bind and cached; locked cards cannot merge, so it never drifts (MinePool.sol:265-266; MinersNFT.sol:323-324).
  • Cost weight excludes one-of-ones, which add mining weight and never pay $CARDS (MinePool.sol:249,258).
  • A deck is passive when endCycle is below the current cycle and active at or above (IMinePool.sol:53-54; MinePool.sol:112-116). Retired is a flag set when the bond ran out at a claim; the next buyShifts clears it (IMinePool.sol:62-63; MinePool.sol:311).
  • unbindDeck(deckId) is owner-only and frozen by pause (MinePool.sol:332-334). The deck must be passive, else DeckStillActive, and fully claimed, else PendingNotSettled (MinePool.sol:335-345). Then every card unlocks and the whole remaining bond is refunded (MinePool.sol:347-359). An active deck cannot be unbound early.
Figure 4.1 What locking means: card bound → transfer, sale, burn and merge revert CardLocked → deck passive and claimed → unbindDeck → card unlocked (MinePool.sol:275-277,351-354; MinersNFT.sol:323-324,490-494)

Numbers #

Card weight is 2^(tier-1) x (1 + 0.25 x stars), on-chain (1 << (tier-1)) x (4 + stars) x WAD / 4, an exact integer at 1e18 (MinePool.sol:61,247). Each tier doubles the one below.

Table 4.2 Weight matrix, card weight by tier and stars
Tier (base)0 stars (x1.00)1 star (x1.25)2 stars (x1.50)3 stars (x1.75)4 stars (x2.00)5 stars (x2.25)6 stars (x2.50)Source
T1 (1)11.251.51.7522.252.5MinePool.sol:247
T2 (2)22.503.03.5044.505.0MinePool.sol:247
T3 (4)45.006.07.0089.0010.0MinePool.sol:247
T4 (8)810.0012.014.001618.0020.0MinePool.sol:247
T5 (16)1620.0024.028.003236.0040.0MinePool.sol:247
T6 (32)3240.0048.056.006472.0080.0MinePool.sol:247
T7 (64)6480.0096.0112.00128144.00160.0MinePool.sol:247
T8 (128)128160.00192.0224.00256288.00320.0MinePool.sol:247
T9 (256)256320.00384.0448.00512576.00640.0MinePool.sol:247

The set bonus is per element and counts distinct designs of that element inside the deck (MinePool.sol:242-246,758-764). It multiplies only that element's cards (MinePool.sol:254-259). A full set is all 63 designs of one element, not all 9 tiers; the one-of-one's design 63 counts as one.

Deck weight is the sum over elements of card weights times bonus (MinePool.sol:252-259). A card's own weight ignores element. The deck's does not.

Table 4.3 Set-bonus ladder
Distinct designs of one element in the deckMultiplierSource
0 to 4x1.00MinePool.sol:763
5 to 14x1.15MinePool.sol:762
15 to 39x1.35MinePool.sol:761
40 to 62x1.60MinePool.sol:760
63 or morex2.00MinePool.sol:759

The four editions of one design count once; the count comes from a per-element design mask (MinePool.sol:242-246).

Table 4.4 Deck states
StateConditionCan buyShiftsCan claimCan unbindCards lockedApp labelSource
PassiveendCycle < currentCycle, retired falseYes, endCycle becomes currentCycle + n (n+1 cycles worked)YesYes, once nothing is pendingYesIDLEIMinePool.sol:53-54,​258-261; MinePool.sol:112-116,​267-268,​307; DeckApp.tsx:645-707
ActiveendCycle >= currentCycleYes, extends by nYesNo, DeckStillActiveYesWORKINGMinePool.sol:313-322,​335
Retiredretired true; endCycle = currentCycle - 1Yes, clears the flagYesYes, once nothing is pendingYesRETIREDIMinePool.sol:62-63; MinePool.sol:311,​456-461,​523-534
Table 4.5 Reverts for bindDeck and unbindDeck
FunctionRevertWhen it firesSource
bindDeckEnforcedPauseThe mine is pausedMinePool.sol:214
bindDeckNotRevealedYetBefore reveal(seed)MinePool.sol:215
bindDeckEmptyDeckNo idsMinePool.sol:217
bindDeckDeckTooLargeMore than 128 idsMinePool.sol:218
bindDeckCardUnavailableA card is not yours, is already in a deck, or is listed twiceMinePool.sol:235-237
bindDeckBadTraitsTraits out of range; a revealed card never trips itMinePool.sol:240
unbindDeckEnforcedPauseThe mine is pausedMinePool.sol:332
unbindDeckNotDeckOwnerNot your deckMinePool.sol:334
unbindDeckDeckStillActiveendCycle >= currentCycleMinePool.sol:335
unbindDeckPendingNotSettledA pending reward on any vein, or a pending costMinePool.sol:337-345
unbindDeckCardsTransferFailedThe bond refund returned falseMinePool.sol:356

Worked example #

Worked example B, the deck every page uses. Five Fire cards, designs 0 to 4, all Tier 1 with 0 stars, and five Moon cards, designs 0 to 4, all Tier 2 with 1 star.

Fire: 5 cards x 1 = 5
5 distinct Fire designs, x1.15 = 5.75
Moon: 5 cards x 2.5 = 12.5
5 distinct Moon designs, x1.15 = 14.375
W = 5.75 + 14.375 = 20.125
Cost weight = 20.125, no one-of-ones in the deck      (MinePool.sol:247,249,254-259)
Table 4.6 Worked example B
ElementCardsWeight eachSubtotalDistinct designsBonusContributionDeck weight afterSource
Fire5, designs 0 to 4, T1 0-star1.0005.0005x1.155.750MinePool.sol:247,​256-257
Moon5, designs 0 to 4, T2 1-star2.50012.5005x1.1514.375MinePool.sol:247,​256-257
Deck weight W1020.12520.125MinePool.sol:252-259
Cost weight1020.12520.125MinePool.sol:249,​258
Variant: the 4 editions of Moon design 0 plus Moon design 152.50012.5002x1.0012.50018.250MinePool.sol:242-246,​763
Variant: add the Void one-of-one, id 5,041, T9 6-star1640.000640.0001x1.00640.000660.125MinePool.sol:249

In the one-of-one variant the cost weight stays 20.125 (MinePool.sol:249).

Edge cases #

  • A deck made only of one-of-ones has cost weight 0, so its required bond is 0 and a claim never clips it (MinePool.sol:249).
  • Claim first, then unbind; a retired deck keeps its cards locked until then (MinePool.sol:351-354).
  • Merge removes a card and can drop an element below a set-bonus step (MinePool.sol:758-764); see Merge.
  • START MINING binds the deck. The bond comes with the first shift, and the mine will not sell that shift until the deck's bond covers requiredBond(deckId, nCycles); see Shifts.
  • The builder does not stop you at 128. The contract does, with DeckTooLarge (MinePool.sol:218).

Verify it on-chain #

Verify it on-chain On MinePool's read-contract tab, MAX_DECK_CARDS() returns 128 (MinePool.sol:54). deckInfo(deckId) returns weight, costWeight, endCycle, bondRemaining and retired (MinePool.sol:698-712); compare endCycle with currentCycle() for the state (MinePool.sol:112-116,151).

cardDeck(id) returns the deck an id sits in, 0 for none (MinePool.sol:157). locked(id) on MinersNFT reads true while the card is in a deck (MinersNFT.sol:484-486). Weights come back as 1e18 integers, so 20.125 reads as 20125000000000000000, 20.125 x 10^18 (MinePool.sol:61,247).

Not in the game #

Not in the game "Hold all 9 tiers of one element and every card in that set doubles." The x2.0 needs 63 distinct designs of one element in one deck (MinePool.sol:758-764). "Element does not affect power." The set bonus is per element (MinePool.sol:252-259). "60-card deck limit." The cap is 128 cards (MinePool.sol:54).

Next #

Read this if you are here to... Top up a bond, read the bond rule. Claim, read Claiming. Merge two of a kind, read Merge. Sell a card, read the lock in Rules; nothing moves until you unbind.

Next page: Shifts, bond and the cost of working.