Shares-of-Staked Seconds

Sacred uses a shares-of-staked-seconds method to calculate the interest earned by each user. For each Sacred pool that is created, all users’ principals are pooled together to earn yield. For each transaction, the yield is pooled together into a smart contract. The user gains a share of the pooled yield rather than the yield paid directly by Aave. The yield earned is dependent on the amount of a user’s deposit and the time that they stayed in the Sacred protocol.

Because the Interest Earned is compounded, the amount of time spent in the protocol is important to know to give users a fair share.

As we can’t directly link each user’s deposit and withdrawal timestamps because of privacy, we use the Share Tracking Mechanism explained below.

The user’s share is the ratio of time that their deposit earned interest in the Sacred Pool to the total time of all deposits currently earning interest in the Sacred pool.

  • To find the time of a user’s deposit in the pool:

    • From their Note when they claim the Interest Earned. As the Note contains information which can link the Deposit + Withdrawal, the time can be calculated.

    • Privacy level is the same as AP Mining.

    • Note: A user can only claim their Share of interest earned after a Note has been spent (Similar to AP Mining).

  • To find the total time of users’ current deposits in the pool:

    • Use a tracker that updates its value whenever there is a deposit, withdrawal or interest claim event.

    • More details below

This javascript example shows how yield distribution works. Note that this is just an example and is not part of the actual contract.

Last updated