## Liquidity Mining
- Timeswap liquidity mining, is a program which potentially incentivizes any timeswap stakeholders, i.e. LP, lender, borrower to participate in the timeswap pools.
- Though it can incentivize folks to participate in the pool in any manner, initially it maybe utilised just to incentivize providing liquidity to specific pools.
- The reward maybe in any combination of ERC20 token for a respective timeswap pool, for a particular timeswap position (i.e. Timeswap Option Long1, Long2, Short/Liquidity Position)
- The amount of reward emmited depends on the reward rate `r`, the staking duration $t_1$ over which the reward gets distributed, $t_2$ the vesting duration over which the distributed reward becomes redeemable
- It is carried out in 2 stages
- Mining
- Vesting
## Stage 1 - Mining
- Is the period in which users come in and stake their Timeswap Positioin (Eg: liquidity position in a particular timeswap pool is locked in a staker contract).
- During this period users earn reward proportianal to the position they have for the amount of time they stake their token.
- This reward is defined by the reward function, which in itself is a function of time
- Reward rate at a time t eg. r(t) = b - st (b>0 & s>0), where b is the base reward rate at unix time zero
- The reward keeps decreasing as times progresses in the staking duration, thus incentivizing users to stake early
## Stage 2 - Harvesting: vesting unlock of reward tokens
- Is the stage in which the reward gets materialised for a particular user
- Suppose a user accrues `r` reward tokens over some time period wihtin the staking duration.
- These tokens are materialised over a vesting time period $t_2$ which maybe independent of the staking duration
- The reward that is accrued over the staking duration becomes redeemable.
- Here too, the reward that is redeemable grows linearly from zero to the rewards accrued during the staking perod within the vesting time period
## Implementation Spec
- [WIP](https://hackmd.io/@yashvik/liquidity)