Giter Site home page Giter Site logo

profit-tracker's People

Contributors

andreabarghigiani avatar andreadigitrails avatar

Watchers

 avatar  avatar

profit-tracker's Issues

Improve display of amounts

Use this regex (^\d+\.0(0{3,})[1-9\d*]*) to identify when a token has an evaluation that contains many zeros so we can wrap the resulting group and display it even better, like in the image below.

CleanShot 2023-05-28 at 08 29 32

Add types of Projects

Right now a project is just able to track protocols that allow you to earn an interest but the investments are much more than this.

Investments types:

  • Passive plays: I deposit some money and I earn a steady income from it. Generally speaking the project pays you in the same token you deposited (commonly a stablecoin but could also be the platform token) and the interest can compound or not.
  • Buy and HODL: the simplest strategy of all, you buy and wait for the price appreciation
  • LP: you can provide liquidity to a DEX and earn a % from the fees or you can stake them and earn in the farm token of the protocol

Still uncertain if there are more, but the thing is the app right now allow to add only the first kind of investment. Need to implement the other two and save specific information based on the type selected.

Add HODL type of investment

Allow a user to open a type of investment called HODL, this will be useful for the kind of DCA or speculative operations an investor can make. The base theory is that I buy low an asset and I'll sell it for profit.

This is the user story:

  • click on "Create HODL investment"
  • the page will ask for token, amount and currencyAmount (this will help to track conversion like "1 ETH used to buy BTC")
  • the app will check the tokens table to see if they'll already tracked
    • if both are tracked, we will go ahead and save the deposit
    • if not tracket, (for now) we ask the user to require token addition to the list
  • once deposit is complete, user can track the value of his investment in the dashboard
  • inside the investment page, user will be able to add new deposits as well as record sells (those will be tracked as withdraw type of transactions)

We will keep an history of all tracked tokens via the CoinMarketCap API, a cron will be fired every 24h.

Issue pulling projects

After dropping the database, the online version has some issues with fetching the projects of a user.

Checking error is clear that's happening because I haven't pushed the new enums.

CleanShot 2023-05-28 at 08 56 06

Add general Pagination component

We're using Prisma and React TanStack Query and both have a nice documentation about how to build a pagination system. Prisma explain us how to prepare the query to do our pagination while the TanStack docs teach us how to leverage the useInfiniteQuery hook and the need of a cursor property.

Build a general Pagination component that allow us to separate the content into different pages and filter them at the same time.

Check compound Projects

Seems the logic for a compound project does not work... It just accrue the normal interest

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.