The qScore is time-weighted balance of QBT in locker. The following is the formula for calculating qScore for each user.
qScore = remaining lockup period / max lockup period * Locked QBT
function scoreOf(address account) external view returns (uint);
- account: The address of the account to get the qScore for.
- RETURN : The current qScore value, scaled by 1e18, of the requested account.
QubitLocker qubitLocker = QubitLocker(<qubitLockerAddress>);
const qubitLocker = await ethers.getContractAt(<lockerABI>, <lockerAddress>);
const score = await qubitLocker.scoreOf(<account>);