buidl-labs / PolkaAnalytics

An analytics platform for the Polkadot Network
https://polkanalytics.com
GNU General Public License v2.0
6 stars 6 forks source link

Data for suggested prompts #79

Closed saumyakaran closed 4 years ago

saumyakaran commented 4 years ago
  1. Take in stake_amount as input
  2. Divide the stake_amount by 16 equal
  3. Use stake_amount / 16 as input to the existing rewards prediction mechanism to get list of expected daily earnings for each validator.
  4. Sort the list in descending order by earnings and extract the top 16 validator objects to an array.
    • This array data can now be directly used in the UI for suggested prompts
  5. Using the array, iterate through each validator object to determine the cumulative_reward for all 16 validators (i.e. sum of rewards for all 16 validators).
    • Now this cumulative_reward can be used on the UI directly.