Scraping Stake Interest
newSharePrice = (stakePrincipal + cumulativeScrapedInterest) / stakeInitialSharesif (newSharePrice > globalSharePrice) globalSharePrice = newSharePricestakeSharesToRemove = interestBeingScrapedNow / globalSharePricestakeCurrentShares = stakeCurrentShares - stakeSharesToRemoveLast updated
Was this helpful?