Victhereum / vicktron.github.io

The Unlicense
0 stars 1 forks source link

Make the investment calculator calculate based on the selected plan #1

Open Victhereum opened 2 years ago

Victhereum commented 2 years ago

After the user selects his staking plan image

The calculator should

  1. Get the user balance and use it as the max for the range slider; say for example the user balance is 5000 then the range slider must not exceed users balance of 5000
  2. know the selected plan and calculate based on that plan image
  3. The range slider should also get the minimum investment for the selected plan so that users don't go below it image
  4. Calculate user's daily rewards ( StakedAmount * APY) / 30
  5. Calculate the user's total rewards (dailyRewards * LockupTime) // Not sure if it's correct though, just do your magic

For now, this is static Find the javascript code that handles this calculation in assets\js\main.js Line: 97 And the frontend of the calculator in deposit.html Line: 547

Elishaokon13 commented 2 years ago

I'll check it now

Victhereum commented 2 years ago

Please @israelabraham it would be a blessing if you can handle this issue yourself, Thanks

aybruhm commented 2 years ago

Sure, man. Will do. 🧰