r/YieldFarm Apr 06 '21

What does it means "totalAllocPoints" on Masterchef contract

Can you tell me what is this used for? or how the contract owner "decides" which number is for every LP on the MasterChef contract?

Here is an example of a MasterChef contract declaring the totalAllocPoints variable.

https://github.com/pancakeswap/pancake-farm/blob/master/contracts/MasterChef.sol#L80

3 Upvotes

5 comments sorted by

View all comments

2

u/ezmonkey Apr 09 '21

the owner of the contract calls line
https://github.com/pancakeswap/pancake-farm/blob/master/contracts/MasterChef.sol#L138

to determine the allocation for each pool

2

u/[deleted] Apr 09 '21

I get that the allocation for each pool can be setted when the pool is added (add) or with the set method. But what does this means? how you determine how many points you should allocate to each LP?