Developers
Search…
Total qScore
The total qScore is time-weighted total balance of QBT in locker. The first value returned by totalScore indicates total summation of qScore for all users. The second value is rate at which the total qScore decreases. (Since the qScore value decreases as the remaining lockup period decreases.)

QubitLocker

1
function totalScore() external view returns (uint score, uint slope);
Copied!
  • account: The address of the account to get the qScore for.
  • RETURN : Tuple of values (score, slope). The score is current total qScore value, scaled by 1e18. The slope is current decreasing rate (per second) for qScore.

Solidity

1
QubitLocker qubitLocker = QubitLocker(<qubitLockerAddress>);
2
(uint score, uint slope) = qubitLocker.totalScore();
Copied!

Ethers.js

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