Giter VIP home page Giter VIP logo

linearbondingcurvetokensale's Introduction

ERC1363 Token Sale with Linear Bonding Curve - MVP

This project demonstrates the sale of ERC1363 tokens using a linear bonding curve (y=x). The bonding curve ensures project liquidity without dependence on DEX or CEX. Each token minted increases the price by 1 ether, while each token burned reduces the price by 1 ether.

Specifications:

  1. Token Standard: the smart contract should implement the ERC1363 standard. It should also implement ERC1363Receiver
  2. Purchase and Minting: When a user sends ETH to the contract, it should trigger the receive function, mint the corresponding amount of tokens and transfer them to the buyer. A linear bonding curve should determine the token price.
  3. Selling and Burning: When a user sends tokens back to the contract, it should trigger the onTransferReceived function. The contract should burn the tokens and send the corresponding amount of ETH back to the seller. The return ETH amount should be calculated according to the current state of the linear bonding curve.
  4. Testing: Include unit tests to verify the correctness of your contract. Tests should cover token buying and selling scenarios, ensuring that the token amounts are calculated correctly, and edge cases are properly handled.

STATUS

Completed MVP:

  • Token Standard
  • Token Purchase/Minting
  • Token Selling/Burning
  • Testing

V1 Enhancements:

  • Upgradeable Smart Contract
  • Vulnerability Detection using Slither
  • Fractional Token Support
    • Enable buying/selling a fraction of a token
  • Scalable Token Buying Mechanism
    • Overcame the limit of 14k tokens via advanced mathematical root-finding
  • Uncovered Test Scenario Addressed
    • Handle case at AMMToken.sol Line:149 by using mocking

Test & Coverage report

npm run test
npm run coverage

linearbondingcurvetokensale's People

Contributors

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