waves_logo Docs
  • Ecosystem Apps
    Ecosystem Apps
  • Waves Explorer
    Waves Explorer
  • Account balance top up in the test network
    Account balance top up in the test network
  • Waves Keeper
    • Getting started with Waves Keeper
      Getting started with Waves Keeper
    • Waves Keeper API
      • Transaction Format
        Transaction Format
      Waves Keeper API
    Waves Keeper
  • Oracles
    • Create an oracle card with Waves Oracle
      Create an oracle card with Waves Oracle
    • Create an oracle card with a data transaction
      Create an oracle card with a data transaction
    • Oracle card
      Oracle card
    • Updating oracle card
      Updating oracle card
    • Data transaction tool
      Data transaction tool
    • How to create an oracle
      How to create an oracle
    Oracles
  • Token Rating
    • User interface
      User interface
    • Rating formula
      Rating formula
    • Data transaction with user's rate
      Data transaction with user's rate
    • Data transaction of the Token Rating oracle
      Data transaction of the Token Rating oracle
    • Token management
      Token management
    Token Rating
      • English
      • Русский
      On this page
        • User's rate R
        • Rate's weight W of a user
        • User's effective balance B
        • User's weight coefficient k
        • Token's rating calculation
      waves_logo Docs

          # Rating formula

          The rating of a token is a daily weighted mean of individual rates of all users who have ever rated the token:

          R = (R1W1 + R2W2 + ... + RnWn) / (W1 + W2 + ... + Wn),

          where

          Rn is a rate of the n-th user,

          Wn is a rate's weight of the n-th user.

          The calculated value of R is rounded to tenths of a number.

          # User's rate Rn

          User rates token with Rn inside of the token card using stars and the Rate button. Rn takes integer values from 1 to 5 inclusive.

          User can rate the same token many times — the latest rate will be taken into account.

          User can rate any token from the web browser in which Waves Keeper is installed if there is at least 1 WCT on users' address balance. The amount of WCT on the balance affects the weight of the user's rate Wn.

          At the time when user rates a token, he pays a fee in WAVES for the data transaction.

          # Rate's weight Wn of a user

          The value of Wn is calculated by the formula:

          Wn = Bnkn,

          where

          Bn is an effective balance of the n-th user in WCT tokens,

          kn — is a weight coefficient of the n-th user.

          The calculated value of Wn is rounded to an integer.

          # User's effective balance Bn

          The effective balance Bn is the balance in WCT at the time when the user rates a token, minus the sum of all outgoing operations in WCT during the next 24 hours.

          If Bn < 1, then the user's rate will not be taken into account during the token's rating calculation.

          # User's weight coefficient kn

          The value of the coefficient kn depends on the value of the effective balance Bn of the user and is calculated by the formula:

          The value of the effective balance Bn of a user The value of the weight coefficient kn
          [1 — 100] 1
          (100 — 35,000] – 0.086 × ln(Bn × 2 ) + 1.66
          (35,000 - 150,000] – 0.0705 × ln(Bn) + 1.34
          (150,000 — 420,000] – 0,00019 × Bn + 162.77
          (420,000 - 580,000] – 0,00011 × Bn + 128.56
          (580,000 — ∞) 0,0621

          The calculated value of kn is rounded to hundredths of a number.

          # Token's rating calculation

          User 1 rated token with 5 stars. At the time of the rate, there were 10,000 WCT on the user's balance.

          In 24 hours, there were 3 operations: spending 300 WTC, spending 200 WTC and income of 500 WTC. It turns out that expenditure operations amount to 300 + 200 = 500 WTC. Thus, 9,500 WCT is the effective balance B1 (despite the fact that the same 10,000 WCT were on the balance after 24 hours, like they were at the time of the rate).

          B1 is in the range of 100 — 35,000, which means we calculate k1 by the formula:

          k1 = -0.086 × ln(9,500 × 2) + 1.66 = -0.086 × 14.2137118 + 1.66 = 0.43762

          The rate's weight:

          W1 = B1 × k1 = 9,500 × 0.43762 = 4,157

          Summary: token received from the user 1 the rate 5 with the weight 4,157.

          User 2 rated the same token with 4 stars. At the time of the rate, there were 70 WCT on the user's balance.

          There were no outgoing operations during the next 24 hours, therefore the effective balance B2 is 70 WCT.

          B2 is in the range of 1 — 100, therefore:

          k2 = 1

          The rate's weight:

          W2 = B2 × k2 = 70 × 1 = 70

          Summary: token received from the user 2 the rate 4 with the weight 70.

          The rating R of the token will be calculated as weighted arithmetic mean of the rates of both users:

          R = (5 × 4,157 + 4 × 70) / (4,157 + 70) = 4,983 (rounded to 5.0)

          4.157 WCT rated token with 5 stars, 70 — with 4, and total WCT weight is 4,227:

          User interface
          Data transaction with user's rate
          User interface
          Data transaction with user's rate