NexusMutual / cover-router

Computes optimal capacity allocation per Nexus Mutual staking pool on cover purchase
MIT License
1 stars 1 forks source link

Cover Router

Computes the optimal capacity allocation in order to get the best price on cover purchases.

Table of Contents

Setup

  1. git clone git@github.com:NexusMutual/cover-router.git
  2. cd cover-router && npm ci
  3. cp .env.sample .env
    1. Set environment variables in .env:
    2. CONCURRENCY_NUMBER= number of concurrent products to process for faster startup
    3. PROVIDER_URL - use either Infura or Alchemy
    4. PORT= port number for the server
  4. To run the server npm run start

Note: if running the server in nodemon(dev), change the destination of persisted data so the server wouldn't restart constantly

Usage

Quote Route

Capacity Route

Capacity Route for a specific product