New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stove-labs/arbitrage-bot-trigger-chain

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stove-labs/arbitrage-bot-trigger-chain

trigger plugin that follows a chaining approach for the arbitrage lifecycle

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

This repository is related to the core library of the arbitrage bot.

Learning resource

Challenge

The most straightforward approach would be to subscribe to new blocks of a blockchain and use that as trigger for the lifecycle. However, this increases complexity and reduces control over the flow if blockchains with various block times are targeted and centralized exchanges come into play. Another approach would be a simple setTimeout to a predefined time-interval/delay at which the lifcycle is triggered. Also this is not viable, because it interrupt pending operations in case those take longer than the time-interval/delay.

Solution

This trigger builds on top of a time based delay (defined in milliseconds), by extending it with a debounce and schedule functionality. It basically chains lifecycles, but waits with the callback as long as the user defined delay.

Implementation

Review src/triggerChainPlugin.ts for a detailed overview.

FAQs

Package last updated on 28 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc