You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get the stake pool address from the staking field (of type StakingInfo) under the VestingContract resource in the vesting contract adresss. Take note of the remaining_grant field in VestingContract
Fetch the StakePool resource for the stake pool address. Take note of the active stake amount.
(Active - remaining_grant) * (1 - commission_rate) = rewards not yet requested for unlock. Commission rate is currently 12% so likely you can just hardcode it.
You can then multiple this value by the shareholder's share amount in the VestingContract's grant_pool and divide by the total original grant (total_coin in grant_pool)
Only tricky part is calculating what's already in flight (rewards being unlocked) as that can includes the operator commission as well. It would take more data stitching to correctly compute that amount
Not sure how possible this is, but if it's somewhat doable, we should try it.
The text was updated successfully, but these errors were encountered: