MasterExcalibur
The MasterExcalibur contract extends the MasterChef to handle time vault staking, in particular through the lock slots logic.
Address: 0x70B9611f3cd33e686ee7535927cE420C2A111005
Github: https://github.com/ExcaliburExchange/contracts/blob/main/farm/MasterExcalibur.sol
Time vault staking: lock slots
Each user has two available lock slots for each farm. They ensure the functioning of the time vault staking, and follow precise rules.
Time vault staking: rewards
Rewards on lock slots are divided into two types, regular rewards and bonus rewards.
To calculate those rewards, the process is rather straightforward. First, a multiplier is calculated based on the lock duration, using this formula:
lockDuration
is in days, 30 is the max lock duration, and 1.5 (50%) the corresponding max available multiplier
The contract then uses a kind of dual accounting, one with the real usersβ depositAmount
, and another one weighting the depositAmount
with this multiplier. That way, the contract is able to adjust every user pool share by faking the depositAmount
for every user lock slot with its active multiplier:
Finally, a simple rule of three is used to get the regular and the bonus rewards:
Last updated