---
# System prepended metadata

title: Transaction Scheduler

---

# Transaction Scheduler

## Overview

The basic idea is to enable signing transactions and scheduling them for later execution in a user friendly manner. This is especially useful in gamefi idle games where you have to perform certain repetitive tasks at specific times for maximum profit. It can also be used in DeFi to automate yield generating strategies. The possibilities are vast. 

The basic architecture would be a containerized REST API which manages the signed data (along with the execution date, gas limits and other possible fail conditions), along with a service which executes them (if appropriate) on the corresponding date. This allows developers to incorporate scheduling into their dApps, but the idea is to also develop a metamask plugin (or fork if necessary) to intercept the regular flow so that users can schedule transactions on their own when using any dApp.

The initial proposal is self-hosted (either by users or protocols), but it could evolve into a centralized service if it proves to be the better use case, or maybe a hybrid solution where we provide an easy way for users to self-host

## Basic features
- Setup and configure nx monorepo (2 days)
- Implement CRUD API in nest.js (4 days)
    - Post signed data to be scheduled (+ date, protocol, max gas price). Allow adding multiple txs at once
    - Get currently scheduled transactions (filter by address, protocol, date ranges, etc)
    - Update transaction
    - Delete transaction
- Implement service that consumes API and runs scheduled transactions (2 days)
- Containerize the API and service and create a CLI for easy deployment and configuration, along with docs and guides (4 days)
- Implement simple ts library that interacts with the scheduler (2 days)
- Implement metmask plugin/fork (10 days)
    - Connect to a running scheduler service (the user can pass the URL as config)
    - Allow signing and scheduling transactions
    - Trigger re-signing of scheduled transactions if nonces need to be shifted
    - Display and manage scheduled transactions

## Nice-to-haves
- Advanced UI to manage the scheduler (manually schedule transactions)
- Allow storing transaction signatures to enable repeating with different parameters
- Centralized scheduler server, possible SaaS solution for people who can’t be bothered (or don’t know how) to deploy their own service
- Reporting/notifications via SMS/email (for example if you need to reorder nonces because of a transaction being aborted due to gas)
- [Entering crazy over-engineered territory] Add more sophisticated fail conditions to transactions via “oracles”. You send an URL together with the signed data to the API. The service queries the URL via GET right before submitting the transaction, and if they receive a specific result, the transaction is aborted. The URL can point to a lambda or whatever that performs some sophisticated logic to check if the transaction is still profitable/desirable. The centralized service could provide out of the box “oracles”, which could be compounded ala GitHub actions

## Budget

### Basic features

US$ 30000, 192 hours -> US$ 156~ an hour

### Nice-to-haves

Dunno, hard to estimate time for those without having the basic stuff in place
