BSC Rewards Dashboard in website

Hi guys. I am not a very experienced Dev. But i started learning somewhere before 5 months ago and i can pretty much understand the basics of Javascript and have already done some small stupid projects. I am also dedicating my time now to learn develeoping websites which interact with Blockchains through web3.js. I want now to create a website where i have a button with something like connect your wallet which interacts with the users wallet (i managed to do it this far) but i also want to make a use out of it and create a dashboard where the user can see his redistributed rewards from a specific Token in BSC. Can you guys please help me with this? really appreciate it. Thank you

How do you get those redistributed rewards, what is that specific token on BSC?

Hi thank you for replying. There is still no specific token on the bsc but i wanted to prepare the website and then create a token to try if it works. Normally the rewards will be distributed to the holders with every transaction (Fees). Example:
if i set in the smart contract 10% fees from which 5% will be redistributed to the total amount of holders. let’s there are two holders in total. the third one will execute a transaction of 100$. He will get only 90$ and 10$ are for the fees. From these 10$, 5$ will be divided by the 2 (amount of total holders) which will be 2,5$ each in value of the token. So now when any of these holders go to this dashboard and connects his wallet, he can see that this far he has his total holdings + the 2,5$ from the redistributed rewards. I really hope i could explain it to you as simple as possible. Thank you again.

You mean that you want to make your specific token that has this reward system? If that is the case then you can use specific events for every reward and those events can be synced in your Moralis server db

Yes exactly. But can u give me some more directions for that? am really still noob in all this. All i managed now is to do this autheticate through metamsk with moralis. Nothing more. The logic will be like following:

  • user clicks on button ‘connect your wallet’
  • metamask or walletconnect appears and the wallet will be connectd.
  • once the wallet connected, all historical transactions ill be collected and stored in the moralis server
  • do some kind of magic to extract only the transactions related to my token and specify which ones were from the users buy/sell and which ones were from rewards
  • than write some JS code to append the results in the website.

like i said if u can guide me through the code i will be very greatfull cause am still newbie in all his. Thank you again cryptokid.

You can start to do some Moralis tutorials in order to understand better how it works, for example this tutorial: https://youtube.com/watch?v=rd0TTLjQLy4
What you want to do is not complicated to do with Moralis.

okey thank you so much. I will fight with this thing again. If i can’t manage to do it i will come to you. Thanks again.