LP Leaderboard

A reflection of how much value an LP added to Jediswap AMM relative to others LPs.

Note: this leaderboard is only for Jediswap v2 right now. We will soon publish a formula to calculate Jediswap v1 points and retroactively assign points for past LPs.

Users need to earn LP points to get into the Jediswap LP leaderboard.

In short, Jediswap LP points are designed to reflect the value added by different users as a liquidity provider relative to other liquidity providers. The LP points formula is designed to give more points to authentic and loyal users in the most effective way possible. It takes into account the productivity and loyalty of a liquidity provider.

LP points formula

Pu=āˆ‘i=1nPuiP_u = \sum_{i=1}^nP_u^i

PuP_u = LP points for a user address "u"

PuiP_u^i = LP points for position "i" for the user address "u"

n = total number of LP positions of user address "u"

Pui=āˆ‘d=1nPui(d)P_u^i = \sum_{d=1}^nP_u^i(d)

Pui(d)P_u^i(d) = Points earned by a position on a day "d"

The points calculation for a day is broken into periods from " the previous day 00:00 UTC to any "increase/decrease liquidity event" until the current day's 00:00 UTC and then summed together.

For example, if Alice had a $100 position at 00:00 UTC the previous day, she removed $50 at 01:00 UTC, added $50 again at 02:00 UTC, and kept it until 00:00 UTC the next day. We will calculate her points in 3 periods.

  1. 00:00 UTC of the previous day till 01:00 UTC

  2. 01:00 UTC till 02:00 UTC

  3. 02:00 UTC till 00:00 UTC of the next day

For a period, here is how the Points calculation happens.

Pui(d)=āˆ‘p=1xFui(p)āˆ—Tui(p)āˆ—poolboost(p)āˆ—1000P_u^i(d) = \sum_{p=1}^x F_u^i(p) * T_u^i(p) * pool boost(p) * 1000

xx = total number of periods for the day

As you see, three factors play a part in measuring LP points for a liquidity position.

Fui(p)F_u^i(p) = Fee earned by position "i" of user "u" in period "p"

Tui(p)T_u^i(p)= Time vested multiplier for the position "i" of user "u" for period "p"

poolboost(p)pool boost(p) = a multiplier based on the liquidity Pool during the period "p"

We do this computation at 00:00 UTC every day.

Fees earned by the position in USD:

Including fees earned as a factor helps Jediswap become more efficient for traders. Since only active positions earn fees, it incentivises liquidity providers to add liquidity within a range that can reduce traders' slippage. Fees accrued by all positions are computed for different periods every day.

Time vested multiplier

Time vested in a position helps the Jediswap community align its focus on sticky liquidity. The more sticky liquidity, the more consistently Jediswap offers the best prices. The value of TuiT_u^i starts with 0 and increases with every block as liquidity is in the pool. Here is how the time vested multiplier is calculated for a period.

Tui=min(1,(Tui+s/FVP)T_u^i = min(1, (T_u^i + s/FVP)

FVP(Full vesting period) = 1296000 (15 days in seconds)

s = time in seconds for a period

When a user calls ā€œdecrease liquidityā€, the value of TuiT_u^i resets to 0.

When a user calls "increase liquidity", the value of TuiT_u^i resets to Tuiāˆ—1/rT_u^i * 1/r

Where r=TVL(new)/TVL(old)r = TVL_(new)/TVL_(old)

TVL(old)TVL_(old) is LP position's old TVL before the "increase liquidity"

TVL(new)TVL_(new) is LP position's new TVL after the "increase liquidity"

Pool boost

The pool boost helps the Jediswap community align its focus towards the pools that add the most value during a given time period. For example, if, at some point in time, the Jediswap community wants to gain market share in a new token pool, the pool boost helps with that. The Jediswap problem-solving guild decides the pool boost for different pools for a time. Pool boost can range from 1 to 3. The default value of pool boost is 1 for eligible pools.

Current pool boost for different pools

Eligible pools - Any pools with one of the tokens from ETH, WBTC, USDC, USDT, DAI

  • ETH - USDC - 2

  • USDC - USDT - 2

  • STRK - ETH - 3

  • STRK - USDC - 3

  • All other pools - 1

Example

Lets say, Alice had a time-vested multiplier value from the previous day, 3/15

Pool boost = 1

The next day, she decreased liquidity by 50% at 01:00 UTC and then increased liquidity by 100% at 02:00 UTC.

We will calculate her points in 3 periods and then sum them together.

  1. From 00:00 UTC the previous day until 01:00 UTC. Let's say during this period, she earned $1 in fees.

  2. 01:00 UTC till 02:00 UTC. Let's say in this period, she earns $0.5 in fees.

  3. 02:00 UTC until 00:00 UTC the next day. Let's say she earns $4 in fees during this period.

1st-period calculation

Time vested multiplier = min(1, 3/15+10000/1296000) = 3/15+10000/1296000 =

P1P_1 = 1*(3/15+10000/1296000)*1*1000 = 207

2nd-period calculation

The time vested multiplier will first reset to 0 and then increase.

Time vested multiplier = min (1, 0+40000/1296000) = 40000/1296000 = 0.20771604938

P2P_2 = 0.5*(40000/1296000)*1*1000 = 15

3rd-period calculation

The time vested multiplier will first reset to T(perviousperiod)/rT_(perviousperiod)/r and then increase.

r = 2 since liquidity was increased by 100%

T(perviousperiod)T_(pervious period) = 0.20771604938

Time left 22 hours(from 02:00 UTC till 23:59 UTC) = 79200

Time vested multiplier = min(1, 0.20771604938 + 79200/1296000) = 0.26882716049

P3P_3 = 4*0.26882716049*1*1000 = 1075

Her total points for the day = P1+P2+P3P_1+P_2+P_3 = 207 + 15 + 1075 = 1297

Now, for the next day, the value of the Time vested multiplier will start from 0.26882716049.

Last updated