Giter VIP home page Giter VIP logo

tec-convert's Introduction

TEC Converter

This repository contains the TEC's Bonding Curve interface. Forked from Aragon Converter.

Getting Started

First, run the development server:

yarn start

Open http://localhost:8080 with your browser to see the result.

tec-convert's People

Contributors

andy-hook avatar bpierre avatar dependabot[bot] avatar evalir avatar geleeroyale avatar marthendalnunes avatar mendesfabio avatar pablocgl avatar sembrestels avatar sohkai avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

tec-convert's Issues

Issues in the Hatch that need to be fixed!!! Notes from Aug 26th, 2021 with Sem, Paulo and Griff

  1. Remove the vesting completely, was left in because the presale was audited... but it really got in the way, it was mistake to leave it in, and the tokens must not be transferable
  2. The refund script is a bit centralized... probably fixed by removing vesting
  3. The hatch connector is not needed, when we removed the contribution table nothing else was needed.. the subgraph was more work than was needed we only needed info that we could get directly from the contracts we don't need any events.
  4. Add a multistep panel that shows what it takes to contribute 3 steps or whatever
  5. The white page error... we need a better error handling solution to catch that error and show the error page (might not be a problem if we remove the graph)
  6. Check to make sure the params that are chosen don't let the impact hour people have weird incentives... there is a max impact hours that someone should have... its a check on the params... weird incentives can happen if the impact hour params provide people with money too early the heavy impact hour people can earn more money by adding money to the hatch and then Ragequitting their extra money. https://colab.research.google.com/drive/1TYbkhI2xk6LJinTj5EnnU6j1wjWTkCG9

Potential improvements that have major scope... probably not needed

  1. Include Celeste into the Dandelion DAO
  2. Migration tools could be made into a more general tool... it's a little complex, and could be simplified... difficult to audit
  3. Start as a Gardens with redemptions... needs thought because people who vote yes could still redeem... some work to accomplish

Support Network API

Do what was done in the hatch... if you are on the wrong network, alert the user!

We can reuse the work in the Hatch Front End

Require a minimum return amount

When we are using makeBuyOrder and makeSellOrder we are not requiring a _minReturnAmountAfterFee, see [1] and [2] respectively.

We may want to set it up with an allowed slippage of -1%. For this we need to complete first #4, to know in the frontend which are the entry and exit tributes.

The minimum received should appear in the interface as well. It can appear below The conversion amount is an estimate, take inspiration from uniswap/honeyswap:
Screenshot from 2020-11-28 23-07-08

Make sure the line break happens in the tooltip

The new tooltip should divide the conversion information into two lines. There is a line break in the code which gets processed (since the "\n" doesn't show up in the frontend), but somewhere along the way it ends up being all in one line again.

Address is not properly detected when it's switched

Steps to reproduce:

  1. Enable account with Account 1
  2. Switch to Account 2 with metamask
  3. Convert some bonded tokens to collateral (TEC to xDAI)
  4. The transaction can not be done because Account 2 is not detected
    Screenshot from 2020-11-14 11-52-02
    Screenshot from 2020-11-14 11-52-22

Create a simple Stats page for the ABC

it should show:

  • Total Supply
  • Price
  • a picture of the price/supply graph with a point that says "You are here" like a map in the mall
  • The Market Cap
  • Entry tribute
  • Exit tribute

Bonus

  • Historical price chart price v time
  • Historical volume chart volume each day
  • a calculator that lets someone test a trade

Catch issue if tokens sold > total supply

Right now, if the user inputs a number of Tec Tokens to sell higher than the total supply Metamask throws an error (since 'calculatePurchaseReturn' in the bonding curve reverts), but the interface doesn't change and just continues showing the last valid number introduced.
Realistically, if somebody tries something like that it will just fail, but for completeness' sake it would be nice to catch the error and notify the user.

Add Error Handling for Failure Due to Slippage

  • User A: submit convert request
  • User B: convert 10K
  • User A: app stalls on "transaction failure". This is likely due to slippage created by user B; app error message should be modified to emphasize failure due to market slippage / price readjustment following sale.

2021-12-02.png

Clean up addresses from config.json file

We can get all known contracts using only MARKET_MAKER and COLLATERAL_TOKEN addresses.This is how you can get the rest of them:

  • BANCOR_FORMULA: marketMaker.formula()
  • BONDING_CURVE_RESERVE: marketMaker.reserve()
  • BONDED_TOKEN: marketMaker.token()
  • TOKEN_MANAGER: marketMaker.tokenManager()

Get Adria's Blessing

  1. Getting the Vote out
  2. Write a forum post about the process
  3. Beg Adria to look at it!!

Manage exit tribute properly

The tribute is not applied in the frontend conversion and can mislead on how much collateral you are going to receive when selling bonded tokens.

The entry tribute and exit tribute should appear just below The conversion amount is an estimate, you can take inspiration from uniswap/honeyswap's liquidity provider fee:

Screenshot from 2020-11-28 23-07-08

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.