Developers
Search…
qScore
The qScore is time-weighted balance of QBT in locker. The following is the formula for calculating qScore for each user.
1
qScore = remaining lockup period / max lockup period * Locked QBT
Copied!

QubitLocker

1
function scoreOf(address account) external view returns (uint);
Copied!
  • account: The address of the account to get the qScore for.
  • RETURN : The current qScore value, scaled by 1e18, of the requested account.

Solidity

1
QubitLocker qubitLocker = QubitLocker(<qubitLockerAddress>);
2
qubitLocker.scoreOf(<account>);
Copied!

Ethers.js

1
const qubitLocker = await ethers.getContractAt(<lockerABI>, <lockerAddress>);
2
const score = await qubitLocker.scoreOf(<account>);
Copied!
Last modified 2mo ago