npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tracer-protocol/trs-keepers

v0.0.4

Published

A collection of keeper bots for Tracer's Total Return Swaps

Downloads

13

Readme

TRS-Keepers

Setup

Install and Build

yarn
yarn run build

Watcher Specific Variables.

These variables are specific to the Watcher. If you don't set them, defaults are in place.

WATCHER_STALE_THRESHOLD = Time in seconds before the Median price is considered stale in the watcher. Default = 5s
WATCHER_PRICE_DIFF_THRESHOLD = Percent (in 10^18 units) deviation that is acceptable between the median price and keeper price. Default = 5% (0.05×10^18)

Docker

Make sure you have docker installed on your machine or environment. You can check you have docker by running docker -v in your terminal of choice.

Create a trs-keepers docker image with npm run docker:build-keepers or yarn docker:build-keepers. This images starts a PriceKeeper and PositionKeeper. Create a watcher docker image with npm run docker:build-watcher or yarn docker:build-watcher.

The created image does not include the required env variables OR any of the optional watcher variables.

  • RPC_URL - Network RPC (required)
  • SIGNING_PRIVATE_KEY - permissioned account to call updatePrices (required)
  • PRICE_FEED - price feed contract address (required)
  • POSITION_ROUTER - position router contract address (required only for trs-keepers)

Run the image

Start running the PriceKeeper and PositionKeeper

  • on Arbitrum docker run -p 9111:9111 -e ARBITRUM_RPC="https://arb1.arbitrum.io/rpc" -e SIGNING_PRIVATE_KEY="A_PERMISSIONED_PRIVATE_KEY" -e PRICE_FEED="priceFeed address" -e POSITION_ROUTER="positionRouter address" trs-keepers
  • on Arbitrum rinkeby docker run -p 9111:9111 -e ARBITRUM_TESTNET_RPC="https://rinkeby.arbitrum.io/rpc" -e SIGNING_PRIVATE_KEY="A_PERMISSIONED_PRIVATE_KEY" -e PRICE_FEED="priceFeed address" POSITION_ROUTER="positionRouter address" trs-keepers

Start running the Watcher

  • on Arbitrum docker run -e NETWORK="42161" -e ARBITRUM_RPC="https://arb1.arbitrum.io/rpc" -e SIGNING_PRIVATE_KEY="<A_PERMISSIONED_PRIVATE_KEY>" trs-watcher
  • on Arbitrum rinkeby docker run -e NETWORK="421611" -e ARBITRUM_TESTNET_RPC="https://rinkeby.arbitrum.io/rpc" -e SIGNING_PRIVATE_KEY="<A_PERMISSIONED_PRIVATE_KEY>" trs-watcher

There is also the option of using a custom/private RPC in place of the public ones used here.