LogoLogo
UMA HomeProjectsVoter DappOO Dapp
  • UMA Protocol
  • Developers
    • Quick start
    • Optimistic Oracle
      • Prediction Market
      • Insurance
      • Data Asserter
      • Escalation Managers
      • Sandboxed Oracle Environment
    • oSnap
      • oSnap Quick Start
      • oSnap Deployment Tutorial
      • Snapshot Proposal + Transaction Tutorial
      • oSnap Proposal Verification
      • oSnap Configuration Parameters
      • Migrate to oSnap Safe App
      • Monitoring Bot Setup
    • Setting Custom Bond and Liveness Parameters
  • Protocol Overview
    • How does UMA's Oracle work?
    • Example Projects
    • DVM 2.0
    • DVM 2.0 FAQ
  • Community
    • Governance
      • The UMIP Process
      • DAO Proposals
  • Using UMA
    • Voting Walkthrough
      • Voter Guide
      • Voting Gas Rebates
    • Proposing Oracle Data
    • Disputing Oracle Data
    • Resolving Disputes
  • Verification Guide
    • Verification System
    • Polymarket
    • oSnap
    • Across
    • Y2K
    • Index
  • Resources
    • Network Information
      • New Network Requests
    • Audit & Bug Bounty Programs
    • Approved Price Identifiers
    • Approved Collateral Types
    • Subgraphs
      • Mainnet Voting Entities
      • Queries
    • Optimistic Oracle v2
      • OO Quick Start
      • Deposit Box
      • Internal Optimistic Oracle
      • Insurance Claim Arbitration
      • Optimistic Arbitrator
      • Event-Based Prediction Market
    • Voting with a 2-Key Contract
    • Unsupported Contracts
    • Additional Resources
    • Glossary
    • Links
    • UMA TVS Methodology
Powered by GitBook
On this page
  • Installation
  • Basic configuration
  • Running the bot

Was this helpful?

Edit on GitHub
  1. Developers
  2. oSnap

Monitoring Bot Setup

Overview of How To Set-up and Run an oSnap Monitoring Bot

PreviousMigrate to oSnap Safe AppNextSetting Custom Bond and Liveness Parameters

Last updated 1 year ago

Was this helpful?

The oSnap Monitoring Bot monitors all transactions to your oSnap module. It also verifies that proposed transactions are valid according to the rules of the oSnap module (ie. the snapshot quorum and voting period meet the oSnap rules). Any unverified proposed transactions should be reviewed further and possibly disputed.

All oSnap propsals are already monitored by bots run by UMA's core team and a decentralized group of human verifiers. You may wish to run this bot so you can monitor your oSnap module yourself.

This tutorial walks through an example of how to setup the oSnap monitoring bot from UMA's that watches for emitted contract events and sends alerts.

The Node package method described below is also available on .

Installation

Docker method

The instructions assume you have installed and its server daemon is running.

Get the latest UMA protocol image that among others includes the required monitoring bot:

docker pull umaprotocol/protocol:latest

Node package method

The instructions assume you have already the latest long term support version of .

Initialize new project directory and install @uma/monitor-v2 package that contains the oSnap monitoring bot:

mkdir monitor-osnap
cd monitor-osnap
npm init -y
npm install @uma/monitor-v2

Basic configuration

All configuration for the monitor bot should be set in a .env file in your working directory. Please see basic configuration variables below:

# Note on formatting: Do not enclose variable values in quotes as this is not supported when running the bot in Docker container.

# Name of the bot identifier as shown in alerts.
BOT_IDENTIFIER=oSnap Monitor Bot

# the address of the deployed Optimistic Governor that this bot will monitor. This does not necessarily need to be deployed through factory.
OG_ADDRESS=

# network number (ie. Ethereum mainnet = 1)
CHAIN_ID=

# a single RPC node URL replacing `X` in variable name with `CHAIN_ID`. This is considered only if matching `NODE_URLS_X` in the advanced config section is not provided.
NODE_URL_X=

# boolean enabling/disabling monitoring transactions proposed (`false` by default).
TRANSACTIONS_PROPOSED_ENABLED=true

# boolean enabling/disabling monitoring transactions executed (`false` by default).
TRANSACTIONS_EXECUTED_ENABLED=true

# boolean enabling/disabling monitoring proposal executed (`false` by default).
PROPOSAL_EXECUTED_ENABLED=true 

# boolean enabling/disabling monitoring proposal deleted (`false` by default).
PROPOSAL_DELETED_ENABLED=true 

# boolean enabling/disabling monitoring set collateral and bond amount (`false` by default).
SET_COLLATERAL_BOND_ENABLED=true 

# boolean enabling/disabling monitoring set rules (`false` by default).
SET_RULES_ENABLED=true 

# boolean enabling/disabling monitoring set liveness (`false` by default).
SET_LIVENESS_ENABLED=true 

# boolean enabling/disabling monitoring set identifier (`false` by default).
SET_IDENTIFIER_ENABLED=true 

# boolean enabling/disabling monitoring set escalation manager (`false` by default).
SET_ESCALATION_MANAGER_ENABLED=true 

  # used to simulate proposed transaction execution on Tenderly. If any of these are missing, the bot will skip the simulation.
  TENDERLY_USER=
  TENDERLY_PROJECT=
  TENDERLY_ACCESS_KEY=

Running the bot

Docker method

Instruct docker to run the oSnap monitor bot by appending COMMAND environment variable to the same .env file where other configuration is stored:

# Command to run when starting docker container:
COMMAND=node ./packages/monitor-v2/dist/monitor-og/index.js

Start the monitoring bot from the same working directory where the .env configuration file is located:

docker run -d --env-file .env --name osnap-monitor --rm umaprotocol/protocol:latest

This should start the oSnap module monitoring bot in a looping mode detached from console where all configured events will be sent to the provided notification channels.

Stop the running bot container with:

docker stop -t 0 osnap-monitor

Node package method

Start the monitoring bot from the root of your project directory where node package was installed and .env configuration file is stored:

node node_modules/@uma/monitor-v2/dist/monitor-og/index.js

This starts the oSnap module monitoring bot in a looping mode where all configured events will be logged in the console.

protocol repository
Youtube
Docker
Node.js