By Lucky Machines

Automate Your On-Chain Game Loops

Decentralized automation with built-in verifiable randomness. No oracles. No manual intervention. Just deploy and play.

~90k
Gas per Tick
$0.008
Cost per Tick
~150k gas
VRF Overhead
Why Autoloop

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.

Integration

Up and Running in 4 Steps

From contract to automated game loop in minutes, not months.

01

Inherit

Extend AutoLoopCompatible or AutoLoopVRFCompatible in your Solidity contract.

02

Implement

Add shouldProgressLoop() to signal readiness and progressLoop() to execute your game logic.

03

Register & Fund

Register your contract on-chain and deposit ETH to cover gas and fees.

04

Let It Run

Workers automatically detect and execute your loops. Sit back and watch your game come alive.

Pricing

Games for Pennies

Autoloop is designed to be affordable. Here's what on-chain automation actually costs at current gas prices.

Standard Loop
$0.008
per tick
VRF Loop
$0.022
per tick
5-min game @ 1 tick/sec
$2.53
10-min game @ 1 tick/sec
$5.05
5-min game @ 10 ticks/sec
$25.25
10-min VRF game @ 1 tick/sec
$13.38

Based on 0.047 gwei gas price and ETH at $1,976. Actual costs vary with network conditions.

Fee Breakdown

Gas reimbursement + buffer
70% base fee (of gas cost)
50% of base fee to controller
50% of base fee to protocol
Gas
+
Base Fee
=
Controller
+
Protocol
Code

Simple by Design

Integrate Autoloop with just two functions. Here's a complete working contract.

NumberGoUp.sol
1"color: #6b7280">// SPDX-License-Identifier: MIT
2"color: #a855f7">pragma "color: #a855f7">solidity ^0.8.13;
3
4"color: #a855f7">import {AutoLoopCompatible} from
5 "autoloop/AutoLoopCompatible.sol";
6
7"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;
12
13 "color: #a855f7">constructor("color: #a855f7">uint256 _interval) {
14 interval = _interval;
15 lastTimeStamp = block.timestamp;
16 }
17
18 "color: #a855f7">function shouldProgressLoop()
19 "color: #a855f7">external "color: #a855f7">view "color: #a855f7">override
20 "color: #a855f7">returns (
21 "color: #a855f7">bool loopIsReady,
22 "color: #a855f7">bytes "color: #a855f7">memory progressWithData
23 )
24 {
25 loopIsReady =
26 (block.timestamp - lastTimeStamp) > interval;
27 progressWithData = abi.encode(_loopID);
28 }
29
30 "color: #a855f7">function progressLoop(
31 "color: #a855f7">bytes "color: #a855f7">calldata progressWithData
32 ) "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}