Giter VIP home page Giter VIP logo

bondingcurve's Introduction

BondingCurve

Node.js CI

This is sample bonding curve contract wrtten for aeternity blockchain. It is written in Sophia programming language and uses custom rational numbers library.

Computation of prices is performed with use of Bancor Formula.

bondingcurve's People

Contributors

dependabot[bot] avatar mradkov avatar radrow avatar thepiwo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

superhero-com

bondingcurve's Issues

Buy/Sell events

Log and expose additional events for the bonding curve contract.

Buy/Sell events so we can track historically the price and the movement of the tokens via the curve contract.

fields: price, amount, token contract address, account

Document how these behave

// Returns the current buy price
entrypoint
buy_price : int => int
buy_price(0) = Frac.round(init_buy_price())
buy_price(total_supply: int) : int =
Frac.ceil(buy_curve(Frac.from_int(total_supply)))
// Returns the current sell price
entrypoint
sell_price : int => int
sell_price(0) = Frac.round(init_sell_price())
sell_price(total_supply: int) : int =
Frac.ceil(sell_curve(Frac.from_int(total_supply)))

  • rounding
  • approximation
  • ...

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.