Giter Site home page Giter Site logo

juster-finance / juster-core Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 4.75 MB

Juster smart contracts for Tezos blockchain

Home Page: https://better-call.dev/granadanet/KT1JPehwEkAhg1z5RVA8wAccYbDgF2E2itDv

License: MIT License

Python 79.45% LigoLANG 20.13% Makefile 0.42%
tezos betting prediction-market

juster-core's Introduction

Juster

This repository contains smart contracts for Juster protocol V1. This is whitepaper implementation that allows to create price dynamic events using Harbinger price data oracle. This contract allows to create multiple events, configure event creation params, customize liquidity provider fees, control retained profit fees and more.

Contracts

  • Juster - core contract that implements price dynamic events logic with internal constant product market maker
  • Pool - liquidity manager that allows to aggregate liquidity from different users and redistribute it to recurring events
  • Token - [work in progress]
  • Reward Program - [work in progress]

Installation

This project managed by poetry. To install all dependencies run:

make install

Compilation

Contract compilation requires ligo compiler version 0.40.0 or higher. The easiest way to run LIGO is using docker. To compile all contracts:

make compile

Testing

All tests written using PyTezos python library. You need to have python 3.10 or higher to run the tests. PyTezos installation requires to have cryptographic libraries in system. This project using poetry to manage python packages. Before running tests you need to install all dependencies and compile contracts. Then you can call:

make test

Deploying

There are python scripts in the scripts directory that allows to run contracts deployment:

poetry shell
python scripts/deploy_juster.py
python scripts/deploy_pool.py

Note that you need to have key.json key file in your project root directory that will be used to deploy the contract. You can get one for test networks here. Also make sure that your ORACLE_ADDRESS and JUSTER_ADDRESS constants refer to the contract you want to.

Description

There are some flow charts that show Juster core contract implementation details:

juster-core's People

Contributors

m-kus avatar ztepler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.