Developers
  • Introduction
  • QTokens
    • Transfer
    • Total Supply
    • Underlying Balance
    • Exchange Rate
    • Get Cash
    • Total Borrow
    • Borrow Balance
    • Borrow Rate
    • Supply Rate
    • Total Reserve
    • Reserve Factor
    • Key Events
  • Qore
    • Market List
    • Enter Markets
    • Exit Markets
    • Get Markets In
    • Supply
    • Redeem with QToken
    • Redeem with Underlying
    • Borrow
    • Repay Borrow
    • Repay Borrow Behalf
    • Liquidate Borrow
    • Get Account Liquidity
    • Market Information
    • Close Factor
    • Liquidation Incentive
    • Qubit Distribution Speeds
    • Pending Qubit (or Accrued Qubit)
    • Claim Qubit
    • Key Events
  • Qubit Locker
    • qScore
    • Total qScore
    • Deposit
    • Locked Balance
    • Locked Period
    • Extend Lock Period
    • Unlocked Balance
    • Withdraw
Powered by GitBook
On this page
  • QubitLocker
  • Solidity
  • Ethers.js

Was this helpful?

  1. Qubit Locker

qScore

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

QubitLocker

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.

Solidity

QubitLocker qubitLocker = QubitLocker(<qubitLockerAddress>);
qubitLocker.scoreOf(<account>);

Ethers.js

const qubitLocker = await ethers.getContractAt(<lockerABI>, <lockerAddress>);
const score = await qubitLocker.scoreOf(<account>);
PreviousKey EventsNextTotal qScore

Last updated 3 years ago

Was this helpful?