Skip to content

Instantly share code, notes, and snippets.

View meteoncu's full-sized avatar
🪃
Hunting for your dream

Mete Öncü meteoncu

🪃
Hunting for your dream
View GitHub Profile
@meteoncu
meteoncu / fully-on-chain-scheduler-avalanche-polkadot-cosmos-cross-subnet-ping-pong.md
Last active June 10, 2025 06:25
Fully On-Chain Scheduler via Native Messaging on Avalanche, Polkadot & Cosmos: The Cross-Subnet Ping-Pong Pattern

Fully On-Chain Scheduler via Native Messaging on Avalanche, Polkadot & Cosmos: The Cross-Subnet Ping-Pong Pattern

Introduction

One of the biggest hurdles in decentralized application development is creating schedulers that can initiate on-chain actions without relying on off-chain keeper services. Keepers introduce centralization risks and can suspend operation unexpectedly, halting any time-based logic.

By leveraging native cross-chain messaging—whether Avalanche Warp Messaging (AWM), Polkadot's XCM, or Cosmos IBC—we can build a fully on-chain, self-sustaining scheduler that requires zero external dependencies. This "Ping-Pong" mechanism has three core components:

  • Asynchronous messages sent natively between chains or subnets
  • Local task execution when each message arrives
@meteoncu
meteoncu / awm-cross-subnet-ping-pong-scheduler.md
Created June 3, 2025 15:54
Protocol-native cross-subnet scheduler on Avalanche using Warp Messaging. Implements the ‘Ping-Pong’ pattern for fully on-chain, validator-relayed task automation.

Protocol‑Native Scheduling with Avalanche Warp Messaging: The Cross‑Subnet Ping‑Pong Pattern

Introduction

One of the most persistent challenges in blockchain development is creating truly decentralised scheduling mechanisms. Smart contracts are great at executing logic when triggered, but they cannot initiate actions by themselves. Historically, we solved the gap with external "keeper" networks that watch the chain and fire transactions at the right moment.

But what if we could absorb those keepers into the protocol itself? Avalanche Warp Messaging (AWM) lets us do exactly that. The very validators that already secure Avalanche can—optionally—run a lightweight Teleporter daemon that signs and relays cross‑subnet messages. As long as at least one such relayer is online (and adequately funded), delivery is guaranteed inside the consensus model; no extra trust layer is introduced.

In this post I present a "Cross‑Subnet Ping‑Pong" pattern that turns AWM into a short‑interval, fully on‑chain scheduler.

@meteoncu
meteoncu / awm-cross-subnet-ping-pong-scheduler.md
Created June 3, 2025 08:37
Building a Fully On-Chain Scheduler with Avalanche Warp Messaging: The Cross-Subnet Ping-Pong Approach - A novel method for creating decentralized schedulers using AWM's asynchronous nature

Building a Fully On-Chain Scheduler with Avalanche Warp Messaging: The Cross-Subnet Ping-Pong Approach

Introduction

One of the most persistent challenges in blockchain development is creating truly decentralized scheduling mechanisms. While smart contracts excel at executing logic when triggered, they cannot initiate actions on their own. This limitation has led to a reliance on external "keepers" — centralized services that monitor the blockchain and trigger time-based functions.

But what if we could eliminate this centralization point entirely? What if we could build a scheduler that lives completely on-chain, with no external dependencies?

Today, I'm excited to share a novel approach that leverages Avalanche Warp Messaging (AWM) to create a fully decentralized, on-chain scheduler using what I call the "Cross-Subnet Ping-Pong" mechanism.