Skip to content
Contract reference Mining5 source only Source e0617449

SQK TokenLink to this section

TL;DRLink to this section

  • SQK starts with zero supply and uses 18 decimal places.
  • Only the fixed Mining proxy can mint, and all minting goes to that same proxy within the lifetime cap.
  • Mining checks work and prevents repeated reward funding; Token does not check those rules itself.

ResponsibilityLink to this section

Token tracks SQK balances and spending allowances using ERC-20, enforces a supply cap with ERC20Capped, and supports signed approvals through EIP-2612 permit. It cannot be upgraded and has no reward calculation, burn function, owner administration or transfer pause.

Dependencies and authorityLink to this section

Dependency or actor Role
Constructor miningProxy Already-deployed code address, fixed mint caller and recipient
Constructor supplyCap Positive permanent lifetime maximum enforced by ERC20Capped
Mining Sole mintForRounds caller; owns work validation, replay prevention and attribution
Holder Transfers and allowance changes under ERC-20 rules
Permit signer Authorizes allowance using nonce, deadline and EIP-712 domain

Token deploys directly, without a proxy. Upgrading Mining changes the code allowed to mint SQK, but Token still enforces the fixed mint caller, recipient and supply cap.

State and viewsLink to this section

View Return / unit
name(), symbol(), decimals() Squeek, SQK, 18
totalSupply(), cap() Minted and maximum SQK base units
balanceOf(account) SQK base units at an address
allowance(owner, spender) Remaining spend authorization in base units
mining() Immutable sole mint authority and recipient
nonces(owner) EIP-2612 replay nonce, independent of Mining upgrades
DOMAIN_SEPARATOR(), eip712Domain() Permit domain readback; name Squeek, version 1, chain and Token address

One SQK is 10^18 base units. Use integer arithmetic and a decimal formatter; converting arbitrary balances to JavaScript number loses precision.

ActionsLink to this section

Action Effect
mintForRounds(RoundMint[] requests) Mining only; records each reported round amount, then mints their total to Mining
transfer(to, value) Holder balance transfer under ERC-20 rules
approve(spender, value) Sets allowance
transferFrom(from, to, value) Allowance-authorized transfer; standard infinite allowance behavior applies
permit(owner, spender, value, deadline, v, r, s) Valid EIP-2612 signature sets allowance and consumes owner's permit nonce

Each RoundMint is (uint64 roundId, uint256 amount). Token accepts repeated round IDs and does not verify their work; Mining's checkpoint logic prevents funding the same certified round twice.

An empty or all-zero request mints no tokens. A nonempty all-zero request still emits each round's reported amount; Token does not track which rounds have already been funded.

Events and errorsLink to this section

Event Meaning
RoundMinted(roundId, amount, totalMinted) Round amount reported by Mining and running supply after that entry
ERC-20 Transfer Mint from zero to Mining, payout/holder movement or other ordinary transfer
ERC-20 Approval Allowance set or changed under inherited standard behavior
EIP712DomainChanged Inherited domain interface declaration; not a project authority to change Token configuration
Errors Meaning
InvalidMining Constructor's Mining address has no code
UnauthorizedMining Mint caller differs from the fixed Mining address
ERC20InvalidCap, ERC20ExceededCap Zero constructor cap or aggregate mint exceeding cap
ERC20InsufficientBalance, ERC20InsufficientAllowance Transfer/allowance cannot cover requested amount
ERC20InvalidSender, ERC20InvalidReceiver, ERC20InvalidApprover, ERC20InvalidSpender Invalid standard ERC-20 address
ERC2612ExpiredSignature, ERC2612InvalidSigner Permit expired or recovered signer differs from owner
ECDSA / nonce errors Invalid signature encoding or replay-related inherited failure

RoundMinted amounts and the combined mint Transfer describe the same new SQK; do not count both as supply increases. If the cap or another check fails, all events and balance changes roll back together.

LimitsLink to this section

  • Token-level cap is constructor-defined and positive; the Mining5 graph additionally requires it at most 2^128-1.
  • Token has no independent batch-size limit, round-order validation, multiplier range or per-round work bound. Mining supplies the bounded 16-active-round checkpoint requests.
  • Mint recipient is always the fixed Mining proxy; callers cannot redirect issuance.
  • Token has no burn function to restore minting capacity.
  • Donations and ordinary transfers do not change total supply or remaining mint capacity.
  • Permit changes an allowance only; it does not authorize Mining claims or NFT merges.
  • Transfers follow standard ERC-20 semantics, including self-transfer; there is no special sink-address rule.

SourceLink to this section

Mining5 source specification e0617449. First-party source is private; see source and release scope.