Giter VIP home page Giter VIP logo

crypt0grapher / mirror-protocol-feed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from torredefarol24/nodetsmongo

2.0 1.0 2.0 20.92 MB

Price Feed for mAssets from Mirror Protocol on Terra Blockchain with Node.js, Express.js, MongoDB, CSV Export, Docker Container

Home Page: https://mirror.planeta.money

License: Apache License 2.0

TypeScript 56.06% Dockerfile 0.69% Pug 42.67% Shell 0.59%

mirror-protocol-feed's Introduction

Mirror Protocol Price Feed

FOSSA Status Node.js CI CodeQL Deploy

App

The app provides info on MAssets over time which are Mirror Protocol assets on Terra blockchain aiming to assist traders with possible arbitrage opportunities. The prices of an Asset received from Oracle and its Mirrored MAsset counterpart are aimed to be equal, but they are not exactly the same. This difference which can be quite significant forms a traders' premium. This tool monitors the premiums and provides a minimal statistical analysis.

Overview

Over the most recent 100K records the app shows:

  • Traders' premium for MAssets as 1 - Real (Oracle) Price/MirrorPrice, and some stats: mean, standard deviation, and charts. 1 - Real (Oracle) Price/MirrorPrice
  • bLuna price is also collected, "premium" is a simulation response of 1 minus how many bLuna can be bought for 1 Luna. 1- bLUNA_TSPool / LUNA_TSPool

Frameworks

Architecture

The monorepo basically consists of two Express.js apps running on the single Node.js instance: the API (serving at port 4000 by default) and the Host (default port 3000).

  • API is a server polling Mirror protocol every 60 seconds and saving the feed to MongoDB database, extracts the data on request and generates HTML pages with Pug templates.
  • Host is a simple HTML/TS application with Bootstrap v5 serving a minimal UI and user interaction.

Installation

  • Clone the repo.
  • Install the bundle with yarn (or npm install).
  • Make sure you got MongoDB instance running.
  • Create .env file from .env.example. Just renaming the file will suffice.
  • Check Mongo config in src/config/keys.ts.
  • Run with yarn start dev for testing.
  • Enjoy, http://localhost:3000 by default.
  • Production: yarn production builds and runs the server. Make use of Dockerfile for containerized deployment or pm2 start ./dist/server.js if you prefer to manage Node.js apps with pm2.

Using chart interface

With touch screen:

  • 1 finger to pan
  • 2 or more finger to pan and zoom

With mouse:

  • Left button drag to pan
  • wheel scroll translate X axis
  • Alt + wheel scroll to translate Y axis
  • Ctrl + wheel scroll to zoom X axis
  • Ctrl + Alt + wheel scroll to zoom Y axis
  • Hold Shift key to speed up translate or zoom 5 times

With trackpad:

  • Pan X or Y direction to translate X axis
  • Alt + Pan X/Y direction to translate X/Y axis
  • Pinch to zoom X axis
  • Alt + pinch to zoom Y axis
  • Hold Shift key to speed up translate or zoom 5 times

License

FOSSA Status

mirror-protocol-feed's People

Contributors

crypt0grapher avatar torredefarol24 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.