Code Monkey home page Code Monkey logo

gladius-contracts's Introduction

Gladius Marketplace Backend

Build Status

Installation & Testing

  • npm install
  • npm run test

Platform Requirements

  • Node.js, >=7.6.0
  • Golang 1.11+

Deployment

There's an interactive CLI in the go folder that can be used to deploy and interact with the contacts on the network of your choosing. Just run go run main.go in that directory, or build your own with go build

You can also use truffle to deploy, just run: truffle migrate --network {your_network}

Code Overview

Market.sol (Market Contract)

The Marketplace contract will hold all information regarding the Gladius Marketplace. This includes which pools are added to the marketplace and who the owners are. In addition the Marketplace has the ability to create and track all pools via the Pool Factory contract.

Pool.sol (PoolFactory and Pool Contracts)

The PoolFactory contract creates and tracks Pool contracts. Pool contracts contain information regarding the P2P network, application server, etc... . We use a factory pattern to create Pool's because it allows us to be more flexible with deploying contacts.

gladius-contracts's People

Contributors

code-merc avatar kleoken avatar overtfuture avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gladius-contracts's Issues

Account Balances

Create a reusable struct for logging balances within the marketplace and the pools

Total balance - Complete Balance
Available Balance - Allocatable Balance
Market Fee Balance - Balance to hold transaction fees
Work Balance - Allocated Balance
Work Completed - Work completed balance
Payout Balance - Balance able to withdraw
Payout Balance - Balance able to withdraw

Test Coverage

Implement a way to evaluate test coverage throughout project

Pool Status

Have an alive/dead status for pools. Since we can't delete pool contracts we need a way to mark them as active or not.

Flat Rate Payment System

Flexible payment system that allows more than a single rate per gb.

For example:

  • First 100gb free
  • Next 400gb .01 GLA
  • After 500gb .02 GLA

Or:

  • First 2tb .01 GLA
  • After .005 GLA

This would be an advertizable feature of a pool in the marketplace, and could give them a competitive edge over others.

Payment System

Implement and refine new payment system to keep track of all account balances for marketplace and pools.

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.