esLBRBoost
Boosts in Lybra are calculated based on a formula that involves the amount of locked up LBR (which equals the amount of esLBR), the Maximum LBR Lock-up Limit (also referred to as the esLBR Limit), and a time weight factor. The formula is as follows:
Boost = (Locked up LBR / Max Lockable LBR/esLBR Limit) * Time Weight
The Maximum LBR Lockable Limit (esLBR Limit) for a user is determined by the ratio of the user's total mint value to the total mint value across the entire protocol, multiplied by the total circulation of LBR and esLBR. This is illustrated as:
Max LBR Lockable Limit (esLBR Limit) = (User Total Mint Value / Protocol Total Mint Value) * (LBR+esLBR) Total Circulation
Users are allowed to lock up more esLBR than the lockable limit, but the boost will be calculated based on the real Maximum esLBR Lockable Limit.
Function Documentation
setLockStatus
The user can set the lock status and choose to use either esLBR or LBR.
id
uint256
The ID of the lock setting.
lbrAmount
uint256
The amount of LBR/esLBR to be locked.
useLBR
bool
Flag indicating whether to use LBR or not.
unLock
Unlocks the user's locked amount.
getUnlockTime
Returns the unlock time for a user.
user
address
The user's address.
getUserBoost
Calculates the user's mining boost based on their lock status.
user
address
The user's address.
userUpdatedAt
uint256
The timestamp when the user's status was last updated.
finishAt
uint256
The timestamp when the boost calculation finishes.
getAmountNeedLocked
Returns the amount of esLBR needed to be locked for a user.
user
address
The user's address.
userLockStatus
Returns the current lock status of the user.
Last updated