Dexfolio App—Dev Update #1

The foundation: Backend architecture, ETH integration, price feed, and the front end UI

Dexfolio | $DEXF | dexfolio.org
3 min readApr 25, 2021

Wow! It’s been a fun and productive month of development!

We want to keep the community updated throughout this development journey, as it’s just as much your project as it is our’s!

Super excited to share a first look at the working Dexfolio app in action! Check out the video below (address hidden for privacy).

Dexfolio App Preview — Apr 23, 2021

Note: There are some calculation bugs in the above demo, which will be fixed after the high value features are implemented (discussed below)!

Our target release date for beta has been Q2 2021 and we’re on schedule to hit it!

So what have we accomplished so far?

  • Backend architecture
  • Address validation
  • App front end, UI components, and animations
  • ETH price integration with amberdata.io
  • Instant address loading
  • Ethereum network support
  • Community founder drawer (keep an eye out for a form to provide your name and profile picture!)
  • Instant push notification framework

We’ve been user testing the app for the past few weeks and learned a lot! Comment if we should write an article about what we learned and the changes we’re going to make based on the feedback we received!

To Do

We’ve got our eyes on two high value features that we’re implementing as we speak: BSC integration and Average cost!

BSC integration

After evaluating the current API integrations for BSC, none offered real-time price updating or the network reliability we are striving for (see image below).

Bitquery unreliable network

So we’ve begun building our own custom node!

This is not an easy undertaking, but our devs are well equipped for the task. They built a custom node twice, one for ETH (before etherscan was even around) and another for TRON protocol!

The payoff for using a custom node for BSC will be immense. We will have scalability, speed, and accuracy for a cheaper cost than integrating an API.

Additionally, we’ll be able to offer our custom node as an API to other companies that want instant and accurate BSC price data!

We already have the BSC test node running, and will be focusing on integrating the full node in the next few weeks!

Average Cost

This seemingly simple concept is actually super difficult to achieve correctly!

To give an idea of the complexity, here’s a high level idea of the backend logic:

  1. Was the token deposited or purchased? (If it’s deposited from another wallet, it doesn’t affect average cost since the price paid is unknown.)
  2. Once we figure out which transactions are purchases, we need to determine what the USD price was for each token at the time of purchase
  3. If we can’t pull the USD price for the token, we will need to look at the token you sold and then check the price of it at the time you did the swap.
  4. Now, let’s say you purchased this token a few times over the past year at different costs. We need to calculate the weighted average cost of all your purchases!
  5. And finally, let’s say you have multiple addresses with the same token, we need to include those purchases in the weighted average cost.

Once we finish the backend login for calculating average cost, we’ll show the average cost, % change, and USD change on the portfolio page!

Other features we’re going to finish for the Beta

  • Adding multiple addresses—focusing on getting the other high priority features first
  • Real-time price updating — we need to do some small adjustments to turn this on

Thank you for reading, subscribe to get notified when we release our next article!

Links

--

--

Dexfolio | $DEXF | dexfolio.org
Dexfolio | $DEXF | dexfolio.org

Written by Dexfolio | $DEXF | dexfolio.org

A multi-DEX tracker with an intelligent alert system. $DEXF, our native token runs on Binance Smart Chain and is used for governance and pro features.

No responses yet