Hi guys, I was just reviewing MasterChef contract from SushiSwap and had this question.
Here is the contract https://github.com/sushiswap/sushiswap/blob/canary/contracts/MasterChef.sol
In the lot of places they do multiplication and division by 1e12
, but couldn't understand why. Couldn't even understand the concept of accSushiPerShare
variable
For example in the updatePool
function
pool.accSushiPerShare = pool.accSushiPerShare.add(
sushiReward.mul(1e12).div(lpSupply)
);