Automations

Provides an overview of the automation life cycle

Automation Creation

Ditto provides its own standard for programmable meta transactions. These signed calldata transactions contain information such as:

  1. Automation key

  2. Maximum gas price for execution

  3. Maximum gas limit

  4. Target contracts for the call and data

Meta format enables gasless automation creation. Leveraging ditto prebuilt modules allows flexible logic enforcement in a permissionless environment.

Ditto's template library makes it easy to create execution checkers, optimized actions, and combine them into strategies such as:

  1. Emergency repayment for Aave

  2. Auto compounding for Uniswap V3

  3. Delta-neutral leveraged strategy Aave + Uniswap V3

Additionally, Ditto uses built-in MEV protection modules in smart contracts via Uniswap's cardinality pools for delayed swaps. Check UniswapDEXModule and DexModule7579.

The Ditto appchain distributes responsibility ranges and ensures continuous simulation of meta transaction execution.

To create a meta transaction or meta automation, the target contract must be integrated into the Ditto contract entry point on the target network.

When working with AA (Account Abstraction), Ditto supports the 7579 standard for smart accounts as a module for creating automations. Once the module is installed, the user can interact directly with the appchain by sending signed meta automations.

To interact with the protocol, the user must ensure integration with Ditto's entry points on the execution networks, either independently or via Ditto's ready-made modules.

Meta automation assembly can be done either through Ditto's SDK or independently, as long as there is a stable connection to Ditto's RPC.

Example via Ditto sdk:

 const wf = await workflowsFactory.create({
    name: 'My first workflow',
    triggers: [usePriceTrigger ? priceTrigger : timeTrigger],
    actions: [
      new UniswapSwapActionCallDataBuilder(
        {
          fromToken: wmatic,
          toToken: usdt,
          fromAmount: `444444321000000`,
          slippagePercent: 0.05,
          providerStrategy: {
            type: 'nodejs',
            chainId: chainId,
            rpcUrl: process.env.INFURA_API_URL!,
          },
        },
        commonConfig
      ),
    ],
    chainId,
  });

Smart accounts

Ditto integration with EC7579 modular account abstraction standard enables automations on the wide range of industry acknowledged smart accounts such as Rhinestone, Biconomy, ZeroDev and Safe.

Supported networks:

As the phase 1 we're going to support ETH Mainnet, Arbitrum, Base, Polygon, Optimism.

And as a Phase 2 we have Swell L2, Berachain and Monad in our pipeline.

Last updated