Skip to main content

Task Manager Overview

The Task Manager is a system that enables scheduling transactions for specific block heights on the Monad blockchain. It provides economic incentives for executors to include these transactions in their target blocks.

note

While FastLane currently operates the executor service, the system is designed to support multiple competing executors in the future.

Why Task Manager?

Task Manager isn't just another scheduler—it's a transformative solution for decentralized automation. Built on Monad's high-throughput architecture, Task Manager brings on-chain scheduling and execution to the forefront, eliminating the need for off-chain keeper networks. This streamlined, integrated approach not only simplifies implementation but also opens up new opportunities for automated processes and recurring tasks.

Key Benefits

  • Seamless Integration: Adapt your existing applications effortlessly with a system designed for plug-and-play automation.
  • Decentralized Execution: Outsource task execution to a competitive network of executors, each incentivized by execution fees.
  • Scalable Design: Built to handle high transaction throughput on Monad.
  • Robust Reliability: Enjoy enhanced security and execution assurance with tasks secured by bonded shMONAD tokens and executed in isolated environments.

Key Features

  • Block-Height Scheduling: Schedule transactions to execute at specific block heights
  • Economic Incentives: Executors are rewarded for including transactions in their target blocks
  • Secure Execution: Tasks execute in isolated environments with bonded shMONAD for economic security
  • Dynamic Pricing: Execution costs adjust based on network conditions and historical metrics

Core Concepts

Task Categories

Tasks are categorized by gas usage:

  • Small Tasks: ≤ 100,000 gas
  • Medium Tasks: ≤ 250,000 gas
  • Large Tasks: ≤ 750,000 gas

Scheduling vs. Execution

Scheduling

  • Tasks are recorded with all necessary details
  • Requires bonding shMONAD tokens for security
  • Bond amount calculated dynamically based on task size and network conditions

Execution

  • Tasks execute at least one block after scheduling
  • Each task runs in an isolated environment
  • Automatic fee distribution to executors and protocol

System Architecture

Economic Model

The Task Manager uses shMONAD tokens for economic security:

  1. Bonding: Tasks require bonded shMONAD based on:

    • Task size category
    • Network conditions
    • Historical execution costs
  2. Fee Distribution:

    • Majority of fees distributed to task executors
    • Small portion reserved for protocol maintenance
note

The exact fee distribution ratios are configurable and may vary between test and production environments. Check the current network configuration for specific details.

Getting Started

To start using the Task Manager, you'll need:

  1. Access to Monad network
  2. MON tokens to:
    • Deposit into shMONAD contract to receive shMONAD tokens
    • Bond shMONAD tokens to secure task execution
  3. Task Manager contract addresses (via AddressHub)
tip

See the shMONAD documentation for detailed instructions on depositing MON and receiving shMONAD tokens.

Basic usage example (from task-manager-script):

// Connect to contracts via AddressHub
const addressHub = new AddressHubHelper(ADDRESS_HUB, publicClient);
const taskManagerAddress = await addressHub.getTaskManagerAddress();

// Encode your task
const targetCall = encodeFunctionData({
abi: targetAbi,
functionName: 'yourFunction',
args: [/* your args */]
});

// Schedule the task
const task = {
gas: BigInt(100_000), // Small task
target: executionEnv,
data: encodeFunctionData({
functionName: 'executeTask',
args: [targetCall]
})
};

// Schedule with quote
const [scheduled, cost, taskId] = await taskManager.scheduleTaskWithQuote(
task,
targetBlock,
maxPayment
);

Next Steps