Back to the calculation. A simplified version, but can be expanded upon or go into more details. This is rather static, e.g. computation to take place every 24 hours.

Suppose the distribution of SEFI to Pool A is supposedly T per day. The total amount qualified for rewards is calculated at 00:00 UTC everyday, according to the formula.

Let amount of LP with no lock-in period be a. They will be assign a weight of 1.

Let amount of LP with no lock-in period of 15 days be b. They will be assigned a weight of 1.01

Let amount of LP with no lock-in period of 30 days be c. They will be assigned a weight of 1.02

Let amount of LP with no lock-in period be 60 days be d. They will be assigned a weight of 1.05

Let amount of LP with no lock-in period be 90 days be e. They will be assigned a weight of 1.12.

Total rated amount of LP = Q = a + (1.01)*b + (1.02)*c + (1.05)*d + (1.12)*e

Hence, reward per rated LP = T/Q.

For people who have no lock period in staking will be given the LP of T/Q x the amount they have put in.

For people who have lock period of 15 days in staking will be given the LP of T/Q x 1.01 x the amount they have put in.

The above is highly simplified, and the APR is only applicable for 24 hours, and has to be recalculated the next day at 00:00 UTC.

For more dynamic computation (e.g. everytime someone stake in the pool, or withdraw from the pool), computation is to be made whenever a contract is executed. The above can be adapted to take that into account.