GithubHelp home page GithubHelp logo

isabella232 / ethermax Goto Github PK

View Code? Open in Web Editor NEW

This project forked from consensysmesh/ethermax

0.0 0.0 0.0 244 KB

On-blockchain contest for solving knapsack problems

License: MIT License

HTML 0.89% JavaScript 98.97% CSS 0.14%

ethermax's Introduction

etherMAX

etherMAX is a contest built on Ethereum to incentivize solving an optimization problem. The app was built for a ConenSys Dapp-athon

On etherMAX, anyone can create their own token sale by describing 1) the max number of tokens available, 2) a minimum price per token, 3) length of sale 4) bond required for each matcher, 5) amount of time allotted to find optimal matches, and 6) a % reward to the best matcher

Contests are created with this method: newContest(uint32 entryPeriod, uint minPrice, uint maxItems, uint32 solvePeriod, uint solverBond, uint32 reward)

This creates a 4 phase contest:

function enter(uint contestId, uint itemCount, uint itemPrice)

  • Entry phase: anyone can commit to purchase a number of tokens at any price. These pledges are non-revocable but funds can be claimed if they are not awarded the tokens

function proposeSolve(uint contestId, uint maxEth)

  • Matching phase: anyone who has put down the bond required by the sale can submit an ETH value that is achievable via combination of the entries. Only the value is required

function claimSolve(uint[] winners, uint contestId, uint solutionId, bool last)

  • Solution claiming phase: the highest value submitter has a period of time to 'prove' their solution by providing the indices of the entries that add up to that sum

function claimItems(uint contestId, uint winnerId)

  • Token claiming phase: anyone who was matched in the previous phase will have access to a new token contract where they can send themselves the purchased amount

You can run a simple interface for creating contests & entries by running cd frontend && npm start

A very naiive knapsack solver can be run with cd solver && npm install && node server <contractAddress> <contestId>

ethermax's People

Contributors

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