Giter Site home page Giter Site logo

genericbounties's Introduction

GenericBounties

genericbounties's People

Contributors

openorg-gg avatar

Watchers

 avatar

genericbounties's Issues

Create a math function and implement it in Solidity [Paid Bounty]

For this bounty you'll design a math function and implement it in Solidity.

In this scenario, users receive a set amount of tokens as a reward each cycle, and have to maintain a safety margin that is expressed as a percent.

Right now, the safety margin does not impact the users rewards. 1e18 tokens earned = 1 e18 tokens paid out.

You should design a math function that will act as a multiplier for this reward.

The function should:

  • Reward at a rate of 1x when a users safety margin is 400%.
  • Reward at a rate of 1.10x when a users safety margin is 500%.
  • Reward at a rate of 0x if a users safety margin is 250% or lower.
  • The reward rate should be skewed in favor of higher numbers. It should not be linear.

Your final work should include both:

  • A math equation.
  • The equation implemented as a function in Solidity.
  • Unit tests showing the function works correctly, can be used with safe math, and properly handles any rounding or truncating.

The payout for this bounty is $250.

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.