オンチェーンゲームループを自動化
Games for Pennies
オンチェーン自動化に必要なすべて
分散型で権限管理された、コスト効率の良いスマートコントラクト自動化のための完全なプロトコル。
分散型ループ実行
オフチェーンワーカーがコントラクトの準備完了を自動検出し、ゲームループを実行。中央集権サーバーなし、単一障害点なし。
検証可能なランダム性を内蔵
ネイティブECVRF証明生成とオンチェーン検証。サイコロ、ドロップなど、すべてのTickで証明可能に公正なランダム性を外部オラクルなしで実現。
Hybrid VRF — 必要な時だけランダム性を
通常コストのTickにVRFはコントラクトが要求した時のみ適用。ゲームがランダム性の必要なタイミングを決定 — ドロップ、クリティカルヒット、スポーン — そのTickだけVRFガスを支払います。VRF 10%時のブレンドコストは~$0.009/tick。
実行時課金モデル
ループが実際に実行された時のみ支払い。ガス払い戻しと、プロトコルとコントローラー間で分割される少額の基本料金。
開発者フレンドリー
シンプルな関数、直接的なhook。サンプルコントラクト付き。
マルチネットワーク対応
Ethereumメインネット、Sepoliaテストネット、またはローカルAnvilにデプロイ。自動デプロイツールでネットワークごとに設定可能。
権限管理とセキュリティ
ロールベースのアクセス制御により、登録されたコントローラーのみがループをトリガー可能。オンチェーンVRF検証が操作を防止。
Every Loop Here Fails the Self-Trigger Test
Games, agents, DeFi, AI — each for a different structural reason. Not design choices. Proofs.
Inverted self-interest
Every VRF tick picks a random floor and damages it. No floor owner will ever trigger the loop — it might hit their own asset. A neutral keeper is the only viable operator.
Nobody should hold the trigger
A dead man's switch that transfers your vault to a beneficiary if you miss a check-in window. The whole point is that no human should control when it fires.
Front-running attack surface
VRF selects winners from a registered pool on schedule. If player-controlled, the trigger holder knows who wins before calling. AutoLoop fires first, asks questions never.
Timing as attack surface
The high bidder wants the auction closed now. Counter-bidders want an extension. No player-controlled trigger is fair — proving the problem extends far beyond randomness.
4-way coordination failure
Third hop in KaijuLeague → KaijuOracle → ForecasterLeaderboard. Adversarial timing, cross-contract dependency, free-rider gas, prize-pool timing attack — no single player resolves all four.
Neutral on-chain schedule
An LLM agent that runs off-chain and acts on-chain every N blocks. The agent itself shouldn't decide when it fires — its operator, users, and rivals all have conflicting interests.
4ステップで稼働開始
コントラクトから自動ゲームループまで、数ヶ月ではなく数分で。
継承
3つのベースコントラクトのいずれかを継承:
- •AutoLoopCompatible — 純粋な自動化
- •AutoLoopHybridVRFCompatible — 選択的ランダム性(ドロップ、クリティカル、スポーン)
- •AutoLoopVRFCompatible — すべてのTickでランダム性
実装
準備完了を通知するshouldProgressLoop()とゲームロジックを実行するprogressLoop()を追加。
登録と資金投入
コントラクトをオンチェーンに登録し、ガスと手数料をカバーするETHを入金。
実行開始
ワーカーが自動的にループを検出して実行。あとはゲームが動き出すのを見届けるだけ。
数セントでゲームを
3段階のオンチェーン自動化 — 純粋な実行からすべてのTickでのFull VRFまで。現在のガス価格での各ティアのコスト。
手数料の内訳
シンプルな設計
たった2つの関数でAutoloopを統合。完全に動作するコントラクトの例。
1// SPDX-License-Identifier: MIT2pragma solidity ^0.8.13;34// Import the base contract that makes any5// contract compatible with AutoLoop workers6import {AutoLoopCompatible} from7 "autoloop/AutoLoopCompatible.sol";89// A simple demo: number goes up every interval10contract NumberGoUp is AutoLoopCompatible {11 uint256 public number;12 uint256 public interval;13 uint256 public lastTimeStamp;14 uint256 private _loopID;1516 constructor(uint256 _interval) {17 interval = _interval;18 lastTimeStamp = block.timestamp;19 }2021 // Workers call this every block to check22 // if the contract is ready for an update23 function shouldProgressLoop()24 external view override25 returns (26 bool loopIsReady,27 bytes memory progressWithData28 )29 {30 // Ready when enough time has passed31 loopIsReady =32 (block.timestamp - lastTimeStamp) > interval;33 // Pass loop ID to prevent duplicate runs34 progressWithData = abi.encode(_loopID);35 }3637 // Called by AutoLoop when shouldProgressLoop38 // returns true — this is your update logic39 function progressLoop(40 bytes calldata progressWithData41 ) external override {42 uint256 loopID =43 abi.decode(progressWithData, (uint256));44 // Guard against stale or replayed calls45 require(loopID == _loopID, "stale loop");46 lastTimeStamp = block.timestamp;47 ++number;48 ++_loopID;49 }50}Chainlinkとの比較をご覧ください
3つの自動化モード — Standard、Hybrid VRF、Full VRF — すべて1つのプロトコルで。別々のサブスクリプション不要。すべてのティアでChainlinkより安い。