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
| Parameter | Value |
|---|---|
| Mining Veins | 4 (Amethyst, Emerald, Sapphire, Ruby) |
| Auction Type | Dutch auction (price decays over time) |
| Auction Duration | 3,600 seconds (1 hour) |
| Start Price Cap | 1 ETH |
| Initial Start Prices | 0.1 / 0.2 / 0.3 / 0.4 ETH (per vein) |
| Minimum Price | 0.01 ETH |
| Mine Cooldown | None (0 seconds) |
| Token Emission | Continuous (per second, per vein) |
| Revenue Split | 80-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_CAPto 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
- Check the current price — Each vein shows its current auction price, decaying in real time
- Set a max price — Anti-sandwich protection. Your transaction reverts if the price exceeds your specified maximum
- Send ETH — Call
mine(slotId, maxPrice, operatorRecipient)with ETH equal to or greater than the current price - Start earning — You immediately begin earning MINERAL tokens per second at the vein's emission rate
- 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
pendingEthbalance) - 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
| Vein | Mineral | Base Emission Rate | Relative Value |
|---|---|---|---|
| Slot 0 | Amethyst | 0.4 tokens/sec | Lowest (budget entry) |
| Slot 1 | Emerald | 0.8 tokens/sec | Medium-low |
| Slot 2 | Sapphire | 1.2 tokens/sec | Medium-high |
| Slot 3 | Ruby | 1.6 tokens/sec | Highest (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:
| Recipient | Share | Description |
|---|---|---|
| Previous Operator | 80% | Paid to the miner who was displaced |
| BuybackVault | 8% | Accumulated for buyback & burn |
| StakingVault | 3% | Distributed as ETH rewards to stakers |
| AutoLPVault | 3% | Accumulated for auto-liquidity provision |
| Treasury | 6% | 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
- Deposit ETH to a vein's pool (minimum 0.01 ETH)
- Pool accumulates ETH from all depositors
- When the pool has enough ETH to mine the vein, anyone can trigger a pool mine
- The pool becomes the vein operator and earns tokens
- When the pool is mined over, the 80% payout is distributed pro-rata to all pool depositors
- 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
| Function | What 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
| Strategy | When to Use | Risk |
|---|---|---|
| Snipe low | Mine when price has decayed near MIN_PRICE | Low cost, but slow token accrual if someone mines you quickly |
| Mine at premium | Mine at higher price for immediate control | Higher cost, higher risk if mined over quickly |
| Vein rotation | Monitor all 4 veins, mine the best value | Time-intensive but optimal |
| Hold position | Stay on a high-emission vein long-term | Works if competition is low |
For Pool Depositors
| Strategy | When to Use |
|---|---|
| Passive earning | Deposit to a pool and earn proportional rewards |
| Low max price | Set a low poolTargetMaxPrice to only mine at cheap prices |
| Multi-pool | Deposit 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
| Parameter | Type | Description |
|---|---|---|
slotCount | immutable | 4 (Amethyst, Emerald, Sapphire, Ruby) |
AUCTION_DURATION | immutable | 3,600 seconds (1 hour) |
MIN_PRICE | immutable | 0.01 ETH |
START_PRICE_CAP | immutable | 1 ETH |
slotInitialStartPrices | immutable | [0.1, 0.2, 0.3, 0.4] ETH |
minMineInterval | immutable | 0 (no cooldown) |
MAX_SLOTS | constant | 32 (protocol-level maximum) |
MIN_POOL_DEPOSIT | constant | 0.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 —
maxPriceparameter on all mine functions - Ownable2Step — Two-step ownership transfer