Skip to main content

Web3 Automation: Automated Blockchain Transactions

Web3 automation enables blockchain transactions to execute automatically without manual user intervention. This includes:
  • Scheduled transactions: Execute at specific times or intervals
  • Trigger-based execution: React to onchain or offchain events
  • Conditional operations: Execute when certain conditions are met
  • Autonomous agents: AI or rule-based systems managing onchain activities
Automation transforms blockchain from a manual, click-to-execute system into a programmable, always-on infrastructure.
CategoryUse Cases
DeFiAuto-compounding yields, rebalancing portfolios, stop-loss orders, recurring investments (DCA)
TradingLimit orders, arbitrage bots, MEV strategies, market making
TreasuryScheduled payments, payroll, vesting distributions
GamingAuto-claiming rewards, resource harvesting, scheduled actions
InfrastructureOracle updates, keeper operations, protocol maintenance
PersonalSubscription payments, recurring transfers, automated savings
Automated transactions require three components:
  1. Authorization: User grants permission for specific actions
  2. Trigger: Condition or schedule that initiates execution
  3. Executor: Service that submits the transaction when triggered
┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│    User      │────▶│   Session    │────▶│   Executor   │
│  (one-time   │     │    Key       │     │   (always    │
│   setup)     │     │  (limited    │     │    online)   │
└──────────────┘     │   scope)     │     └──────────────┘
                     └──────────────┘            │

                                          ┌──────────────┐
                                          │  Blockchain  │
                                          └──────────────┘
With session keys, users can authorize specific automated actions without exposing their main private key.
Session keys are temporary, scoped signing keys that enable secure automation:
  • Time-limited: Valid only for a specific duration
  • Action-scoped: Can only perform specific operations
  • Revocable: User can cancel authorization anytime
  • Non-custodial: User retains full control of main wallet
import { createSessionKey } from "@biconomy/abstractjs";

// Create a session key for automated swaps
const session = await createSessionKey({
  account: smartAccount,
  permissions: [
    {
      type: "contract-call",
      target: UNISWAP_ROUTER,
      functions: ["exactInputSingle"],
      constraints: {
        maxValue: parseEther("1.0"), // Max 1 ETH per transaction
        dailyLimit: parseEther("10.0") // Max 10 ETH per day
      }
    }
  ],
  expiry: Date.now() + 7 * 24 * 60 * 60 * 1000 // 7 days
});
The executor uses this session key to submit transactions within the defined scope.
Agentic signers are autonomous programs that hold session keys and execute transactions based on predefined logic or AI decisions. Types include:
TypeDescriptionExample
Rule-basedExecutes on fixed conditionsStop-loss bot: sell if price drops 10%
Schedule-basedExecutes at intervalsDCA bot: buy $100 ETH every week
AI-poweredUses ML for decisionsTrading agent: analyze market and optimize entries
Event-drivenReacts to onchain eventsArbitrage bot: execute when price discrepancy detected
// Example: Agentic signer for DCA strategy
const dcaAgent = new AgentSigner({
  sessionKey: session,
  strategy: {
    type: "schedule",
    interval: "weekly",
    action: {
      type: "swap",
      from: "USDC",
      to: "ETH",
      amount: "100"
    }
  }
});

dcaAgent.start(); // Runs autonomously
Setting up automated trading with Biconomy involves:Step 1: Create a smart account with MEE
import { createMeeClient, toMultichainNexusAccount } from "@biconomy/abstractjs";

const account = await toMultichainNexusAccount({
  signer: ownerSigner,
  chains: [base, arbitrum]
});

const meeClient = await createMeeClient({ account });
MEE (Modular Execution Environment) provides all ERC-4337 bundler and paymaster functionality needed for automation, plus cross-chain capabilities.
Step 2: Define automation policy
const policy = {
  permissions: [{
    type: "defi",
    protocols: ["uniswap-v3", "aave"],
    actions: ["swap", "deposit", "withdraw"],
    constraints: {
      maxSlippage: 0.5, // 0.5%
      dailyVolumeLimit: parseEther("100")
    }
  }],
  validUntil: Date.now() + 30 * 24 * 60 * 60 * 1000 // 30 days
};
Step 3: Grant session to executor
const session = await account.createSession({
  policy,
  executor: AUTOMATION_SERVICE_ADDRESS
});
Step 4: Configure automation logic
await automationService.configure({
  sessionId: session.id,
  triggers: [
    { type: "price", token: "ETH", condition: "lt", value: 2000 },
    { type: "schedule", cron: "0 0 * * 1" } // Every Monday
  ],
  actions: [...]
});
Biconomy’s automation infrastructure includes multiple security layers:
ProtectionDescription
Scoped permissionsSession keys can only perform explicitly allowed actions
Spending limitsPer-transaction, daily, and total limits on value
Time boundsSessions automatically expire after set duration
RevocationUsers can cancel sessions instantly
AllowlistsRestrict to specific contracts and functions
Rate limitsPrevent excessive transaction frequency
// Example: Highly restricted session
const restrictedSession = {
  permissions: [{
    target: SPECIFIC_CONTRACT,
    functions: ["deposit"],
    constraints: {
      maxValuePerTx: parseEther("0.1"),
      maxTxPerDay: 5,
      maxTotalValue: parseEther("1.0")
    }
  }],
  validUntil: Date.now() + 24 * 60 * 60 * 1000, // 24 hours only
  requireConfirmationAbove: parseEther("0.5") // Require user signature above 0.5 ETH
};
Yes! Biconomy’s automation supports cross-chain workflows:
const crossChainAutomation = {
  trigger: {
    type: "price",
    chain: 1, // Monitor on Ethereum
    token: "ETH",
    condition: "gt",
    value: 4000
  },
  action: {
    type: "orchestrated",
    instructions: [
      { chain: 1, action: "swap", from: "ETH", to: "USDC" },
      { action: "bridge", from: 1, to: 8453 }, // Bridge to Base
      { chain: 8453, action: "deposit", protocol: "aave" }
    ]
  }
};
The automation service handles:
  • Cross-chain message passing
  • Bridge monitoring
  • Gas on all chains (can be sponsored)
  • Failure recovery
AspectTraditional KeepersSmart Account Automation
ControlProtocol-controlledUser-controlled
ScopeProtocol-specific tasksAny user-defined action
AuthorizationRelies on protocol permissionsSession keys with user consent
FlexibilityFixed functionalityFully programmable
CostUsually subsidized by protocolUser or sponsor pays
Biconomy’s automation lets users set up their own “keepers” for personal workflows.
Building an AI agent with Biconomy MEE:
import { createMeeClient, toMultichainNexusAccount, createSession } from "@biconomy/abstractjs";
import { TradingAI } from "./your-ai-model";

// 1. Setup smart account with MEE
const account = await toMultichainNexusAccount({
  signer: ownerSigner,
  chains: [base]
});
const meeClient = await createMeeClient({ account });

// 2. Create scoped session for AI
const session = await createSession({
  account,
  permissions: [{
    type: "trading",
    maxPositionSize: parseEther("10"),
    allowedPairs: ["ETH/USDC", "BTC/USDC"],
    maxSlippage: 1 // 1%
  }]
});

// 3. Initialize AI with session
const agent = new TradingAI({
  sessionKey: session.key,
  meeClient,
  
  async onDecision(action) {
    // AI decides to trade - execute via MEE
    if (action.type === "buy") {
      const quote = await meeClient.getQuote({
        instructions: [buildSwapInstruction(action)],
        feeToken: { address: "sponsored" }
      });
      return meeClient.executeQuote({ quote, sessionKey: session.key });
    }
  }
});

// 4. Run agent
agent.start({
  dataFeeds: ["price", "volume", "sentiment"],
  decisionInterval: 60 * 1000 // Every minute
});

Start automating