Contract API
Mine
One Mine, hourly price decay, emissions and payment claims.
Loading…
Browse documentation
Contract API
One Mine, hourly price decay, emissions and payment claims.
Loading…
Contract API
One Mine, hourly price decay, emissions and payment claims.
This reference is generated from the repository contracts. Check the deployed version before using a signature or constant. The audit covers a specific source revision.
Source: src/core/Mine.sol
Artifact: out/Mine.sol/Mine.json
Distributes Coin through one replaceable mining slot priced by a Dutch auction.
The slot has an hourly Dutch auction and a tenure-locked Coin emission rate. Replacement settles the outgoing tenure's accrued Coin and credits 80% of the USDG price to its miner. Optional creator and protocol claims use independent creator and Launchpad protocol rates; the remainder goes to the configured revenue destination. The creator may replace that destination for future mining payments. An empty slot has no outgoing-miner claim. Launchpad issues the configured genesis-liquidity allocation before permanently handing mint authority to Mine. Coin issuance, slot state, existing payment claims, and Fund accounting are unaffected by revenue redirection. Token calculations use raw units, and integer divisions round down unless stated otherwise.
Public ABI: 43 functions, 11 events, 16 custom errors, 1 constructor, 0 receive entries, 0 fallback entries.
constructor(address,address,address,address,address,(uint256,uint256,uint256))constructor(address coin_, contract IERC20 usdg_, address fund_, address revenueRouter_, address initialOwner, struct Mine.EmissionConfig emissionConfig);Creates the mining market with one empty slot and an initial revenue destination. Requires the token, Fund, and router dependencies to contain deployed code. The initial owner remains the immutable fee source. In canonical launches, Launchpad binds Coin mint authority and the router graph, then transfers ownership to FundController. Later ownership transfers take effect immediately.
Parameters
coin_: Coin token this Mine will mint after the one-time authority handoff.emissionConfig: Immutable bounded schedule; every incoming tenure locks its prospective rate.fund_: Ownerless canonical Fund associated with the fixed launch graph.initialOwner: Canonical Launchpad and initial authority for creator-fee and revenue settings.revenueRouter_: Initial contract receiving the complete mining-revenue remainder.usdg_: Standard USDG token paid by miners in raw units.BPS()function BPS() external view returns (uint256 arg0);Basis-point denominator used for replacement-payment allocation; 10,000 represents 100%.
DEFAULT_CREATOR_FEE_BPS()function DEFAULT_CREATOR_FEE_BPS() external view returns (uint256 arg0);Initial creator fee before the launch-specific setting is applied, in basis points.
HALVING_PERIOD()function HALVING_PERIOD() external view returns (uint256 arg0);Fixed interval in seconds between prospective global-rate halvings.
INITIAL_TPS()function INITIAL_TPS() external view returns (uint256 arg0);Initial prospective global emission rate, in raw Coin units per second.
MAX_CREATOR_FEE_BPS()function MAX_CREATOR_FEE_BPS() external view returns (uint256 arg0);Largest supported creator fee: 2% of the full mining payment, in basis points.
MAX_HALVING_PERIOD()function MAX_HALVING_PERIOD() external view returns (uint256 arg0);Inclusive maximum interval between prospective global-rate halvings, in seconds.
MAX_INITIAL_PRICE()function MAX_INITIAL_PRICE() external view returns (uint256 arg0);Maximum starting price for every newly opened auction, in raw USDG units.
MAX_INITIAL_TPS()function MAX_INITIAL_TPS() external view returns (uint256 arg0);Inclusive maximum initial emission rate, in raw Coin units per second.
MAX_MESSAGE_BYTES()function MAX_MESSAGE_BYTES() external view returns (uint256 arg0);Maximum raw byte length of the message stored with a mining tenure.
MAX_TAIL_TPS()function MAX_TAIL_TPS() external view returns (uint256 arg0);Inclusive maximum tail emission rate, in raw Coin units per second.
MIN_CREATOR_FEE_BPS()function MIN_CREATOR_FEE_BPS() external view returns (uint256 arg0);Smallest supported creator fee, in basis points of the full mining payment.
MIN_HALVING_PERIOD()function MIN_HALVING_PERIOD() external view returns (uint256 arg0);Inclusive minimum interval between prospective global-rate halvings, in seconds.
MIN_INITIAL_PRICE()function MIN_INITIAL_PRICE() external view returns (uint256 arg0);Minimum starting price for every newly opened auction, in raw USDG units.
MIN_INITIAL_TPS()function MIN_INITIAL_TPS() external view returns (uint256 arg0);Inclusive minimum initial emission rate, in raw Coin units per second.
MIN_TAIL_TPS()function MIN_TAIL_TPS() external view returns (uint256 arg0);Inclusive minimum tail emission rate, in raw Coin units per second.
PREVIOUS_MINER_BPS()function PREVIOUS_MINER_BPS() external view returns (uint256 arg0);Share of a paid nonempty-slot replacement credited to the outgoing tenure miner, in basis points.
PRICE_DECAY_PERIOD()function PRICE_DECAY_PERIOD() external view returns (uint256 arg0);Duration in seconds over which the replacement price decays linearly to zero.
PRICE_MULTIPLIER()function PRICE_MULTIPLIER() external view returns (uint256 arg0);Dimensionless multiplier applied to each paid price to start the next auction.
TAIL_TPS()function TAIL_TPS() external view returns (uint256 arg0);Strictly positive prospective global tail rate, in raw Coin units per second.
claimPayment(address)function claimPayment(address account) external;Pays an account's complete accumulated outgoing-miner and fee USDG claim. Permissionless: the caller may trigger another account's claim, but payment always goes to account. State is cleared before the standard USDG transfer; a failed transfer preserves the claim through rollback.
Parameters
account: Beneficiary receiving its complete claim in raw USDG units.claimablePayment(address)function claimablePayment(address account) external view returns (uint256 amount);Aggregate pull-based USDG payments owed to each beneficiary.
coin()function coin() external view returns (contract ICoin arg0);Canonical Coin token this contract mints after the external one-time authority binding.
creatorFeeBps()function creatorFeeBps() external view returns (uint256 arg0);Creator-controlled fee for future payments, in basis points of the full mining price.
creatorFeeRecipient()function creatorFeeRecipient() external view returns (address arg0);Mutable creator fee beneficiary. Zero disables only the creator claim.
currentPrice()function currentPrice() external view returns (uint256 paymentAmount);Returns the slot's current linearly decaying USDG replacement price. The elapsed decay component rounds down, and the returned price is zero at or after one decay period.
Returns
paymentAmount: Current replacement payment in raw USDG units.effectiveTotalSupply()function effectiveTotalSupply() external view returns (uint256 amount);Returns current Coin total supply plus the active tenure's accrued unminted mining emission. This view does not mint Coin, settle the slot, or change an occupied tenure's rate.
Returns
amount: Economically effective Coin supply in raw units.fund()function fund() external view returns (address arg0);Ownerless canonical Fund associated with this Mine's fixed launch graph.
launchpad()function launchpad() external view returns (contract ILaunchpad arg0);Immutable Launchpad queried for the protocol fee rate and recipient on each paid replacement.
mine(address,uint256,uint256,uint256,string)function mine(address miner, uint256 expectedEpochId, uint256 deadline, uint256 maximumPayment, string message) external returns (uint256 paymentAmount);Starts a new tenure in the mining slot at its current linearly decaying USDG price. Permissionless. The caller pays any nonzero price, while miner receives the tenure. The outgoing slot is settled before its rate is replaced. For a nonempty slot, 80% of the payment rounded down becomes a pull claim. Each enabled creator/protocol recipient receives its independently configured, separately rounded fee, and the snapshotted revenue destination receives the complete remainder. The optional message is stored with the incoming tenure. Fund cannot receive a mining tenure. Execution is allowed at deadline exactly.
Parameters
deadline: Latest Unix timestamp at which the replacement may execute.expectedEpochId: Expected slot epoch, protecting against an earlier replacement.maximumPayment: Maximum raw USDG payment accepted by the caller.message: Optional stored message of at most MAX_MESSAGE_BYTES raw bytes.miner: Account receiving the slot and its later Coin emission.Returns
paymentAmount: Actual raw USDG payment required at execution time.nextGlobalTps()function nextGlobalTps() external view returns (uint256 tps);Returns the emission rate that the next tenure will receive. The rate halves at completed HALVING_PERIOD boundaries after deployment and never falls below TAIL_TPS. The occupied slot retains its previously assigned rate until it is replaced.
Returns
tps: Prospective global emission rate in raw Coin units per second.owner()function owner() external view returns (address arg0);Returns the address of the current owner.
pendingEmission()function pendingEmission() external view returns (uint256 amount);Returns the active tenure's accrued unminted Coin. Returns zero while the slot is empty. Otherwise emission accrues from the auction start at the locked rate.
Returns
amount: Accrued unminted Coin amount in raw units.renounceOwnership()function renounceOwnership() external;Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
revenueRouter()function revenueRouter() external view returns (address arg0);Destination for future mining-revenue deposits, initially the launch's ResonanceRouter.
setCreatorFeeBps(uint256)function setCreatorFeeBps(uint256 newFeeBps) external;Changes the rate for future creator-fee accruals without changing existing claims.
Parameters
newFeeBps: Creator fee in basis points, within the inclusive 1 to 200 range.setCreatorFeeRecipient(address)function setCreatorFeeRecipient(address newRecipient) external;Changes only the beneficiary for future creator-fee accruals; zero disables that future claim.
Parameters
newRecipient: Beneficiary of future creator fees, or zero to leave that share with the revenue destination.setRevenueRouter(address)function setRevenueRouter(address newRouter) external;Replaces the destination for future mining revenue without migrating existing protocol state. The destination must contain deployed code. It may be a replacement router or the canonical Fund. No callback or interface probe is made to either destination; code presence does not prove compatibility.
Parameters
newRouter: Contract receiving the remainder of future mining payments.slot()function slot() external view returns (struct Mine.Slot slotState);Returns the complete mining-slot state without accruing or settling it.
Returns
slotState: Current slot state.startTime()function startTime() external view returns (uint256 arg0);Unix timestamp anchoring the immutable time-based halving schedule.
totalClaimablePayments()function totalClaimablePayments() external view returns (uint256 arg0);Total raw USDG units currently owed across all payment beneficiaries.
totalMined()function totalMined() external view returns (uint256 arg0);Cumulative raw Coin units minted by tenure settlement, excluding the genesis allocation.
transferOwnership(address)function transferOwnership(address newOwner) external;Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
usdg()function usdg() external view returns (contract IERC20 arg0);Standard, non-rebasing USDG token paid in raw units to replace the mining slot.
CreatorFeeAccrued(address,uint256,uint256)event CreatorFeeAccrued(address indexed beneficiary, uint256 indexed epochId, uint256 amount);Emitted for each enabled creator-fee allocation, including a rounded-zero allocation.
CreatorFeeBpsSet(uint256,uint256)event CreatorFeeBpsSet(uint256 previousFeeBps, uint256 newFeeBps);Emitted when FundController changes the rate for future creator-fee accruals.
CreatorFeeRecipientSet(address,address)event CreatorFeeRecipientSet(address indexed previousRecipient, address indexed newRecipient);Emitted when FundController changes the beneficiary for future creator-fee accruals.
EmissionSettled(address,uint256,uint256)event EmissionSettled(address indexed miner, uint256 indexed epochId, uint256 amount);Emitted after one outgoing miner's complete tenure emission is minted.
Parameters
amount: Raw Coin amount minted for the tenure.epochId: Identifier of the tenure that was settled.miner: Outgoing miner that received the minted Coin.Mined(address,address,uint256,address,uint256,uint256,uint256,string)event Mined(address indexed payer, address indexed miner, uint256 indexed epochId, address previousMiner, uint256 paymentAmount, uint256 nextInitialPrice, uint256 tps, string message);Emitted after the mining slot begins a new tenure, including a possible self-replacement.
Parameters
epochId: Slot epoch identifier consumed by this replacement.message: Message stored with the incoming tenure and supplied in this event.miner: Incoming miner assigned to the slot.nextInitialPrice: Raw USDG starting price assigned to the next auction.payer: Account that initiated the replacement and supplied any nonzero USDG payment.paymentAmount: Raw USDG price paid at execution time.previousMiner: Outgoing tenure miner, possibly equal to miner, or zero if the slot was empty.tps: Incoming miner's tenure-locked rate, in raw Coin units per second.MinerPaymentAccrued(address,uint256,uint256)event MinerPaymentAccrued(address indexed miner, uint256 indexed epochId, uint256 amount);Emitted after replacement proceeds become claimable by an outgoing tenure miner.
Parameters
amount: Raw USDG amount accrued, rounded down from the configured basis-point share.epochId: Identifier of the outgoing tenure.miner: Outgoing tenure miner entitled to the payment.OwnershipTransferred(address,address)event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);No additional NatSpec notice is present in the compiled artifact.
PaymentClaimed(address,uint256)event PaymentClaimed(address indexed account, uint256 amount);Emitted after an account's complete accumulated USDG payment is claimed.
Parameters
account: Beneficiary that received the payment, regardless of who initiated the claim.amount: Raw USDG amount paid.ProtocolFeeAccrued(address,uint256,uint256)event ProtocolFeeAccrued(address indexed beneficiary, uint256 indexed epochId, uint256 amount);Emitted for each enabled protocol-fee allocation, including a rounded-zero allocation.
RevenueDeposited(uint256,address,uint256)event RevenueDeposited(uint256 indexed epochId, address indexed revenueRouter, uint256 amount);Emitted after the exhaustive payment remainder is transferred to the snapshotted revenue destination. Under the supported standard USDG model, a successful SafeERC20 transfer delivers amount to the router. The event does not assert that the destination subsequently forwarded the USDG.
Parameters
amount: Raw USDG amount transferred to the destination.epochId: Slot epoch identifier consumed by the replacement.revenueRouter: Revenue destination that received this deposit.RevenueRouterSet(address,address)event RevenueRouterSet(address indexed previousRouter, address indexed newRouter);Emitted when FundController changes the destination of future mining revenue.
DeadlinePassed(uint256)error DeadlinePassed(uint256 deadline);No additional NatSpec notice is present in the compiled artifact.
EpochIdMismatch(uint256,uint256)error EpochIdMismatch(uint256 expected, uint256 actual);No additional NatSpec notice is present in the compiled artifact.
InitialTpsBelowTail(uint256,uint256)error InitialTpsBelowTail(uint256 initialTps, uint256 tailTps);No additional NatSpec notice is present in the compiled artifact.
InvalidCreatorFeeBps(uint256)error InvalidCreatorFeeBps(uint256 feeBps);No additional NatSpec notice is present in the compiled artifact.
InvalidHalvingPeriod(uint256)error InvalidHalvingPeriod(uint256 halvingPeriod);No additional NatSpec notice is present in the compiled artifact.
InvalidInitialTps(uint256)error InvalidInitialTps(uint256 initialTps);No additional NatSpec notice is present in the compiled artifact.
InvalidMiner(address)error InvalidMiner(address miner);No additional NatSpec notice is present in the compiled artifact.
InvalidTailTps(uint256)error InvalidTailTps(uint256 tailTps);No additional NatSpec notice is present in the compiled artifact.
MaximumPaymentExceeded(uint256,uint256)error MaximumPaymentExceeded(uint256 paymentAmount, uint256 maximumPayment);No additional NatSpec notice is present in the compiled artifact.
MessageTooLong(uint256)error MessageTooLong(uint256 length);No additional NatSpec notice is present in the compiled artifact.
NothingToClaim(address)error NothingToClaim(address account);No additional NatSpec notice is present in the compiled artifact.
OwnableInvalidOwner(address)error OwnableInvalidOwner(address owner);No additional NatSpec notice is present in the compiled artifact.
OwnableUnauthorizedAccount(address)error OwnableUnauthorizedAccount(address account);No additional NatSpec notice is present in the compiled artifact.
ReentrancyGuardReentrantCall()error ReentrancyGuardReentrantCall();No additional NatSpec notice is present in the compiled artifact.
SafeERC20FailedOperation(address)error SafeERC20FailedOperation(address token);No additional NatSpec notice is present in the compiled artifact.
ZeroAddress()error ZeroAddress();No additional NatSpec notice is present in the compiled artifact.