Status: This repository is in an early development stage. APIs, parameters, and architecture may change before stable releases.
Tyche is an immutable mining and randomness protocol for high-speed, low-fee EVM environments. It combines VRF-style (signature-derived) share validity with EIP-918 mining interfaces and exposes a decentralized randomness oracle for external contracts.
Initial chain focus is MegaETH, with staged expansion to other EVM networks after stability and telemetry validation.
- Fully on-chain control flow after initialization (no owner pause, no mutable admin config path).
- Signature-based VRF-style proof validation with anti-replay constraints per
(miner, Challenge). - EIP-918 mining interface exposure (
mint,getMiningTarget,getMiningChallenge). - Oracle randomness read interface (
getLatestRandom) from finalized rounds. - Dual-purpose staking for target relief and stake-gated oracle fee governance (Vote Tyche,
vTYCHE). - Stake-share target allocation after staking starts, so splitting stake across many accounts does not increase aggregate target.
- Zero-stake mining is disabled; startup mining uses one-time bootstrap seed that is directly credited as initial stake at deployment.
- Damped Oracle fee governance with floor price and per-epoch max step limits.
contracts/core/TycheToken.sol: Standard ERC20-like TYCHE token with no fee-on-transfer; controller burn is used for oracle fee sink.contracts/core/TycheController.sol: Mining/oracle core orchestration and round finalization.contracts/core/OracleFeeManager.sol(spec target): Oracle fee damping with epoch step bounds; updates are stake-gated via controller.contracts/core/ShareDAG.sol: Round-scoped DAG share storage and settlement progression.contracts/core/SettlementAuction.sol: Time-based settlement reward auction with surge mode after delay threshold.contracts/core/TycheSystemFactory.sol: System deployment and one-shot wiring.contracts/core/TycheEconomicsSimulator.sol: Pure simulation utility for policy window behavior.contracts/libraries/FixedPointMath.sol: WAD math and deterministic fixed-point primitives.contracts/libraries/TycheTypes.sol: Shared protocol structs.
- Miner obtains current challenge via
getMiningChallenge. - Miner performs CPU nonce search and computes proof/output
(nonce, π, V)against registered keypair. - Miner submits share via
mint/submitSharepath; controller verifies proof + target + replay conditions. - Valid shares are ingested into current round and later finalized permissionlessly.
- Finalized round randomness is aggregated and exposed through oracle read methods.
- Oracle calls pay TYCHE fees, split into burn and staker yield under damped governance.
Mining target policy:
- Before any stake exists: mining target is
0(zero-stake mining disabled). - Startup is enabled through one-time bootstrap seed (
bootstrapMiner,bootstrapMintAmount) at deployment. - After stake exists: target is stake-share based (
stake_i / totalStaked) with a global multiplier, making stake-splitting Sybil-neutral at aggregate level.
Mining search policy:
- For each challenge, miners search over
noncespace on CPU. - Signature verification is over
keccak256(challenge || nonce). - Output check uses
keccak256(proof || nonce) <= target.
Oracle fee voting policy:
- Stakers cast one weighted vote per epoch via locked stake.
- Epoch finalization applies stake-weighted average vote only when quorum is met against an epoch stake snapshot.
- If quorum is not met, fee remains at current value (no forced jump).
- VRF proof verification and per-challenge replay protection.
- Registered-key activation delay to reduce precomputation abuse.
- Deterministic multi-share randomness aggregation per finalized round.
- Damped governance with absolute fee floor and bounded step changes.
- Non-reentrant critical paths and deterministic round finalization.
- Child contracts are deployed and wired by factory bootstrapper.
- Each child supports one-time
initializeControlleronly. - After initialization, runtime control is performed only by immutable protocol logic.
- No emergency stop circuit is included.
Deployment starts on MegaETH.
TycheSystemFactory enforces fixed branding:
Tyche/TYCHE
- Deploy contract:
contracts/core/TycheSystemFactory.sol - Call entrypoint:
deploySystem(DeployConfig)on the deployed factory - Runtime mining contract: the
controlleraddress returned bydeploySystem(this is theTycheControllerminers must submit shares to)
Required constructor config includes:
stakeLockDurationfor anti-flash-stake lock.minOracleFeefor absolute oracle fee floor.maxFeeStepPctfor epoch fee damping bound.voteEpochDurationfor governance cadence.bootstrapMinerfor one-time startup seed recipient.bootstrapMintAmountfor one-time startup seed amount.
Recommended initial MegaETH baseline.
| Chain | Symbol | minDifficulty |
difficultyCap |
auctionTargetDelay (s) |
auctionSlopePerSecond |
alphaWad |
decayKWad |
tailReward |
stakeLockDuration (s) |
minOracleFee |
maxFeeStepPct |
voteEpochDuration (s) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MegaETH | TYCHE | 130 | 6500 | 2 | 13 | 85000000000000000 | 1850000000000 | 200000000000000000 | 720 | 1000000000000000 | 500 | 3600 |
These are baseline presets, not hard guarantees. Run simulation/fuzz and live gas-latency observation before production rollout.
stateRootis used for cycle-context binding only and is excluded from parameter-rotation entropy.- Emission and control loops are deterministic approximations, not floating-point exact replicas of symbolic formulas.
- VRF verification gas must remain under strict budget via optimized curve libraries.
- Oracle fee governance is bounded but still requires economic monitoring against volume shocks.
- Tail emission remains inflationary without sufficient sinks, so
tailRewardmust be periodically re-evaluated.
- Add invariant/fuzz tests for DAG parent rules and param rotation under adversarial workloads.
- Add gas snapshots for share submission and finalize paths.
- Add deployment scripts with canonical mainnet parameter presets.
Contributions are welcome while the protocol is in early development.
Please follow the guidelines in CONTRIBUTING.md before opening issues or pull requests.
This project is licensed under the MIT License.
See LICENSE for details.