Basic rule: Every second of every cent is calculated by a smart contract and used to calculate rewards at the end of the epoch. Users may claim rewards even after a full withdrawal.
Rewards distribution period (Epochs)
The rewards distribution period is not fixed. Currently, it occurs every 12 hours from the previous distribution. Whether it occurs rarely or frequently, it does not affect the distribution of rewards to users.
Calculation of Rewards
User 1 deposits $x_1$ at moment $t_1$
User 2 deposits $x_2$ at moment $t_2$
and so on …
The smart-contract distributes Y rewards at moment $t_{endOfEpoch}$
Then $totalTokenTime = \sum(t_{endOfEpoch}-t_i)*x_i$
The rewards for each user are calculated based on their token holding time.
This means that a user's rewards are dependent on the amount of time that the deposit remains in the contracts during the Epoch
Claim after full withdrawal
The algorithm calculates the amount of time a user's assets remain in storage contracts. For instance, if a user deposits assets, waits for an hour, and withdraws them, the algorithm records the time and amount of the transaction in the distribution. A user can claim rewards even after withdrawing their assets.
user 1 deposits X USDT at the begining of epoch, waits 6 hours, withdraws full deposit
user 2 deposits X USDT at the begining of epoch and does not withdraw anything