Automate Your On-Chain Game Loops
Everything You Need for On-Chain Automation
A complete protocol for decentralized, permissioned, and cost-efficient smart contract automation.
Decentralized Loop Execution
Off-chain workers automatically detect when your contract is ready and execute game loops. No centralized servers, no single points of failure.
Built-in Verifiable Randomness
Native ECVRF proof generation and on-chain verification. Provably fair randomness for dice rolls, loot drops, and more -- without external oracles.
Fee-on-Execution Model
Pay only when loops actually run. Gas reimbursement plus a small base fee split between protocol and controllers. Transparent and predictable.
Developer Friendly
Two functions. That's it. Implement shouldProgressLoop() and progressLoop() to integrate. Sample contracts and a full dashboard included.
Multi-Network Ready
Deploy on Ethereum mainnet, Sepolia testnet, or local Anvil for development. Configurable per-network with automatic deployment tooling.
Permissioned & Secure
Role-based access control ensures only registered controllers can trigger loops. On-chain VRF verification prevents manipulation.
Up and Running in 4 Steps
From contract to automated game loop in minutes, not months.
Inherit
Extend AutoLoopCompatible or AutoLoopVRFCompatible in your Solidity contract.
Implement
Add shouldProgressLoop() to signal readiness and progressLoop() to execute your game logic.
Register & Fund
Register your contract on-chain and deposit ETH to cover gas and fees.
Let It Run
Workers automatically detect and execute your loops. Sit back and watch your game come alive.
Games for Pennies
Autoloop is designed to be affordable. Here's what on-chain automation actually costs at current gas prices.
Based on 0.047 gwei gas price and ETH at $1,976. Actual costs vary with network conditions.
Fee Breakdown
Simple by Design
Integrate Autoloop with just two functions. Here's a complete working contract.
1"color: #6b7280">// SPDX-License-Identifier: MIT2"color: #a855f7">pragma "color: #a855f7">solidity ^0.8.13;34"color: #a855f7">import {AutoLoopCompatible} from5 "autoloop/AutoLoopCompatible.sol";67"color: #a855f7">contract NumberGoUp "color: #a855f7">is AutoLoopCompatible {8 "color: #a855f7">uint256 "color: #a855f7">public number;9 "color: #a855f7">uint256 "color: #a855f7">public interval;10 "color: #a855f7">uint256 "color: #a855f7">public lastTimeStamp;11 "color: #a855f7">uint256 "color: #a855f7">private _loopID;1213 "color: #a855f7">constructor("color: #a855f7">uint256 _interval) {14 interval = _interval;15 lastTimeStamp = block.timestamp;16 }1718 "color: #a855f7">function shouldProgressLoop()19 "color: #a855f7">external "color: #a855f7">view "color: #a855f7">override20 "color: #a855f7">returns (21 "color: #a855f7">bool loopIsReady,22 "color: #a855f7">bytes "color: #a855f7">memory progressWithData23 )24 {25 loopIsReady =26 (block.timestamp - lastTimeStamp) > interval;27 progressWithData = abi.encode(_loopID);28 }2930 "color: #a855f7">function progressLoop(31 "color: #a855f7">bytes "color: #a855f7">calldata progressWithData32 ) "color: #a855f7">external "color: #a855f7">override {33 "color: #a855f7">uint256 loopID =34 abi.decode(progressWithData, ("color: #a855f7">uint256));35 "color: #a855f7">require(loopID == _loopID, "stale loop");36 lastTimeStamp = block.timestamp;37 ++number;38 ++_loopID;39 }40}