Skip to main content

Auction Mining

Auction Mining is MINERAL's primary token distribution mechanism. It uses a Dutch auction model where miners compete to operate token-emitting veins by bidding ETH.


Overview​

ParameterValue
Mining Veins4 (Amethyst, Emerald, Sapphire, Ruby)
Auction TypeDutch auction (price decays over time)
Auction Duration3,600 seconds (1 hour)
Start Price Cap1 ETH
Initial Start Prices0.1 / 0.2 / 0.3 / 0.4 ETH (per vein)
Minimum Price0.01 ETH
Mine CooldownNone (0 seconds)
Token EmissionContinuous (per second, per vein)
Revenue Split80-8-3-3-6

How Dutch Auctions Work​

A Dutch auction starts at a high price and decreases linearly over time until someone buys. In MINERAL:

Start Price ─────────────────────────── HIGH
\
\
\ Price decays linearly
\
\
\
──────────────────────────── MIN_PRICE

|← ──── AUCTION_DURATION ──── →|

Price Formula​

elapsed = current_time - auction_start_time

If elapsed >= AUCTION_DURATION:
price = MIN_PRICE

Otherwise:
remaining = AUCTION_DURATION - elapsed
price = max(startPrice * remaining / AUCTION_DURATION, MIN_PRICE)

The price decays linearly from startPrice down to MIN_PRICE over the AUCTION_DURATION.

Next Auction Start Price​

When someone mines a vein, the next auction's start price is set to:

nextStartPrice = min(paidPrice * 2, START_PRICE_CAP)
nextStartPrice = max(nextStartPrice, initialStartPrice) // floor protection
  • The price doubles from what was paid
  • Capped at START_PRICE_CAP to prevent overflow
  • Floored at the vein's initial start price (prevents zero-trap: if mined at MIN_PRICE, the next auction doesn't start at 2 * MIN_PRICE but at the vein's original start price)

Mining a Vein​

Step by Step​

  1. Check the current price — Each vein shows its current auction price, decaying in real time
  2. Set a max price — Anti-sandwich protection. Your transaction reverts if the price exceeds your specified maximum
  3. Send ETH — Call mine(slotId, maxPrice, operatorRecipient) with ETH equal to or greater than the current price
  4. Start earning — You immediately begin earning MINERAL tokens per second at the vein's emission rate
  5. Hold or defend — You earn tokens until someone else mines your vein (or the emission epoch changes)

What Happens When You're Mined Over​

When another miner takes over your vein:

  • You stop earning tokens immediately
  • You receive 80% of the price they paid (credited to your pendingEth balance)
  • Your accumulated unrefined MINERAL remains in the RefineVault, ready to refine

Anti-Sandwich Protection​

The maxPrice parameter prevents MEV attacks:

  • You specify the maximum price you're willing to pay
  • If the on-chain price at execution time exceeds your max, the transaction reverts
  • This prevents frontrunners from manipulating the price before your transaction lands

Cooldown​

An optional minMineInterval parameter (set at deployment) can enforce a minimum time between mines on the same slot. This prevents rapid-fire mining attacks.


The Four Veins​

VeinMineralBase Emission RateRelative Value
Slot 0Amethyst0.4 tokens/secLowest (budget entry)
Slot 1Emerald0.8 tokens/secMedium-low
Slot 2Sapphire1.2 tokens/secMedium-high
Slot 3Ruby1.6 tokens/secHighest (premium)

Higher emission veins are more profitable per second, so they command higher auction prices. The market finds equilibrium: if Ruby's price is too high relative to emissions, miners will shift to cheaper veins. If Amethyst is underpriced, someone will take it.

Emission Rates Change Over Time​

Emission rates follow the epoch-based halving schedule. Every 28 days (one epoch), rates can decay by a configurable percentage. See Tokenomics & Emissions for the full schedule.


Revenue Distribution (80-8-3-3-6)​

Every ETH paid to mine a vein is split:

RecipientShareDescription
Previous Operator80%Paid to the miner who was displaced
BuybackVault8%Accumulated for buyback & burn
StakingVault3%Distributed as ETH rewards to stakers
AutoLPVault3%Accumulated for auto-liquidity provision
Treasury6%Protocol development fund

Payment Flow​

Miner pays ETH to mine a vein
│
├── 80% → Previous Operator's pendingEth (pull-based)
├── 8% → BuybackVault (direct transfer)
├── 3% → StakingVault.fundRewards() (direct transfer)
├── 3% → AutoLPVault (direct transfer)
└── 6% → Treasury (direct transfer, with pendingEth fallback)

Pull-Based Payment (Previous Operator)​

The previous operator's 80% is not sent directly. Instead, it's credited to a pendingEth mapping. The operator must call withdrawPendingEth() to claim it.

Why pull-based?

  • Prevents reentrancy attacks
  • Supports smart contract wallets that may have complex receive() functions
  • Ensures the mine transaction never fails due to the previous operator's wallet

First Miner (No Previous Operator)​

When a vein is mined for the very first time (or after protocol deployment), there is no previous operator. In this case, the 80% share goes to the treasury instead.


Pool Mining​

For miners who want to participate without actively managing positions, MINERAL offers pool mining on each vein.

How Pools Work​

  1. Deposit ETH to a vein's pool (minimum 0.01 ETH)
  2. Pool accumulates ETH from all depositors
  3. When the pool has enough ETH to mine the vein, anyone can trigger a pool mine
  4. The pool becomes the vein operator and earns tokens
  5. When the pool is mined over, the 80% payout is distributed pro-rata to all pool depositors
  6. Token emissions are also distributed pro-rata

Pool Target Max Price​

Pool depositors can set a maximum price they're willing to accept for the pool mine:

  • setPoolTargetMaxPrice(slotId, maxPrice) — Sets your max
  • The pool mine will only execute if currentPrice <= poolTargetMaxPrice
  • You can only decrease your max price (never increase) to protect other depositors
  • If you fully withdraw, your max price setting is cleared

Pool Locking​

After a pool successfully mines a vein, the pool becomes permanently locked:

  • No new deposits allowed
  • No withdrawals allowed
  • The pool earns tokens and ETH until it's mined over
  • Once mined over, depositors can claim their share of ETH and unrefined tokens

Pool Claim Functions​

FunctionWhat You Claim
claimPoolUnrefined(slotId, to)Your share of earned unrefined MINERAL tokens
claimPoolEth(slotId, to)Your share of the 80% payout when pool was mined over

Overshoot Handling​

If the pool has more ETH than the current vein price, the overshoot (excess ETH) is distributed pro-rata back to pool depositors as claimable ETH.


Token Accrual (Unrefined)​

How Tokens Accumulate​

Every second a vein is operated, tokens accrue to the operator:

accrued = ratePerSecond * elapsedSeconds

The EmissionsController reserves this amount from the remaining supply, and the RefineVault credits it to the operator as unrefined MINERAL.

Epoch-Spanning Calculations​

If an operator holds a vein across an epoch boundary (when rates change), the system correctly calculates emissions using both the old and new rates — with a geometric series formula for precise cross-epoch calculations.

Claiming Unrefined Tokens​

Operators (or pool depositors) claim their unrefined tokens via:

  • claimPoolUnrefined(slotId, to) for pool participants
  • Automatic accrual during mine/settle operations for direct operators

Unrefined tokens must be refined to become tradeable MINERAL. See Refining Mechanism.


Strategy Guide​

For Individual Miners​

StrategyWhen to UseRisk
Snipe lowMine when price has decayed near MIN_PRICELow cost, but slow token accrual if someone mines you quickly
Mine at premiumMine at higher price for immediate controlHigher cost, higher risk if mined over quickly
Vein rotationMonitor all 4 veins, mine the best valueTime-intensive but optimal
Hold positionStay on a high-emission vein long-termWorks if competition is low

For Pool Depositors​

StrategyWhen to Use
Passive earningDeposit to a pool and earn proportional rewards
Low max priceSet a low poolTargetMaxPrice to only mine at cheap prices
Multi-poolDeposit to multiple vein pools for diversification

Key Insight​

The optimal mining strategy depends on the ratio of auction price to expected token earnings. If a vein is cheap and emissions are high, it's a good mine. If the price is high relative to remaining epoch emissions, it might be better to wait.


Technical Details​

Contract Parameters​

ParameterTypeDescription
slotCountimmutable4 (Amethyst, Emerald, Sapphire, Ruby)
AUCTION_DURATIONimmutable3,600 seconds (1 hour)
MIN_PRICEimmutable0.01 ETH
START_PRICE_CAPimmutable1 ETH
slotInitialStartPricesimmutable[0.1, 0.2, 0.3, 0.4] ETH
minMineIntervalimmutable0 (no cooldown)
MAX_SLOTSconstant32 (protocol-level maximum)
MIN_POOL_DEPOSITconstant0.01 ETH

Security Features​

  • ReentrancyGuard on all state-modifying functions
  • Pausable — Owner can pause/unpause mining in emergencies
  • Pull-based ETH — Previous operator payments use pull pattern
  • Anti-sandwich — maxPrice parameter on all mine functions
  • Ownable2Step — Two-step ownership transfer