Scraping Stake Interest

Users will have the ability to withdraw (scrape) any amount of earned interest from an Active stake (i.e. before the stake fully matures).

Users can choose exactly how much interest they wish to scrape, up to the maximum (all accrued, unscraped interest from all previous days). Scraping interest from an Active stake can be done multiple times over the course of the stake.

Scraping interest is possible starting on day 2 of the active stake. On day 1 (the first active day), the stake has not yet completed a full day of being active, and thus has not yet accrued any interest.

When a stake is closed, whether Active or Mature, the interest minted back to the user only includes interest that hasn't already been scraped.

Scraping interest will not affect the stake's principal, but will reduce the number of shares the stake has going forward. This effectively means that the stake will earn slightly less interest on the current and all future days of the stake than it otherwise would have. This share reduction also prevents users from being able to end up with more overall shares if they choose to immediately re-stake their scraped interest.

Scraping interest may cause a share price increase, just as when closing a stake. Stakes track exactly how much cumulative scraped interest the user has scraped over the course of the stake, for the purpose of these calculations. The process for determining the possible share price increase and the stake shares reduction is as follows:

First, calculate a possible new share price based on the stake's pseudo-return (principal plus all scraped interest thus far, including this scrape) divided by the stake's initial shares:

newSharePrice = (stakePrincipal + cumulativeScrapedInterest) / stakeInitialShares

Next, if this new share price is greater than the current global share price, update the global share price (which may have just increased due to this scrape):

if (newSharePrice > globalSharePrice) globalSharePrice = newSharePrice

Next, calculate an amount of shares to be removed from the stake, based on the interest being scraped now and the global share price:

stakeSharesToRemove = interestBeingScrapedNow / globalSharePrice

Finally, reduce the stake's current shares:

stakeCurrentShares = stakeCurrentShares - stakeSharesToRemove

Last updated