gVires Math

All the related math you need to know

VIRES, gVires & Half-life

The core of math is simple: At any time, accounts lose half of their current commitment in 6 months. The algorithm is based on a half-life decay formula:

Given a user uu commits Vu,t0V_{u, t_0} Vires tokens at time t0t_0,

gVires(u,t)=Vu,t0eλ(tt0)gVires_{(u,t)} = V_{u, t_0} * e^{-\lambda(t-t_0)}

where λ\lambda indicates the decay speed(half-life time):

λ=ln(2)/180/1440=0.00000267417\lambda = ln(2) / 180 / 1440 = 0.00000267417

Example for 1 particpant

For example, a user X1-locked 100 Vires on Jan 1, 2022. The user’s governance power starts decaying; his tokens start to unlock:

Date

gVires

Still locked VIRES

Unlocked VIRES

Jan 1, 2022, 00:00

100.00 gVires

100.00 ⓥ

0.00 ⓥ

Feb 1, 2022

89.09 gVires

89.09 ⓥ

10.91 ⓥ

Mar 1, 2022

79.37 gVires

79.37 ⓥ

20.63 ⓥ

Apr 1, 2022

70.71 gVires

70.71 ⓥ

29.29 ⓥ

May 1, 2022

63.00 gVires

63.00 ⓥ

37.00 ⓥ

June 1, 2022

56.12 gVires

56.12 ⓥ

43.88 ⓥ

July 1, 2022

50.00 gVires

50.00 ⓥ

50.00 ⓥ

Jan 1, 2023

25.00 gVires

25.00 ⓥ

75.00 ⓥ

July 1, 2023

12.50 gVires

12.50 ⓥ

87.50 ⓥ

Jan 1, 2024, 00:00

6.25 gVires

0.00 ⓥ

100 ⓥ

As illustrated above,

  • The unlock starts immediately after locking VIRES,

  • In half a year, the users’s amount of gVires gets halved; also, half of VIRES is free to be withdrawn,

  • In two years, there’s a cliff: user can withdraw all the rest vires now(6.25% of initial lock), although if he doesn’t do it, he still has the voting, governance, and revenue stream power(under the continued decay);

Example for multiple participants

Vires.finance markets take a cut of the interest that borrowers pay. The ‘Protocol share’ value can be found under any asset on the asset details page. Generally, it can be different for different markets, and this value is up to governance to configure. Let’s look at an example:

  • Borrowers on the USDC market have borrowed 100M USC for 36.5% APR,

  • Therefore, borrowers on the USDC market have to pay 100,000 USDC of interest today,

  • Protocol share for USDC is 10%; therefore, governance receive 10,000 USDC today,

  • Alice and Bob locked 100 VIRES each yesterday, totaling 200 gVires(by 100 gVires each), so Alice and Bob both received 5,000 USDC today;

Day 0:

user

VIRES in the system

Still locked VIRES = gVires

Already unlocked VIRES

gVires

Revenue share

Alice

100 ⓥ

100 ⓥ

0 ⓥ

100

50%

Bob

100 ⓥ

100 ⓥ

0 ⓥ

100

50%

Now, after half a year, all the gVires have decayed:

  • Alice accounts for 50 gVires, Bob accounts for 50 gVires(of now total 100), so they still split the revenue stream 50-50%,

user

VIRES in the system

Still locked VIRES = gVires

Already unlocked VIRES

gVires

Revenue share

Alice

100 ⓥ

50 ⓥ

50 ⓥ

50

50%

Bob

100 ⓥ

50 ⓥ

50 ⓥ

50

50%

  • Dave comes in and locks 100 VIRES, which grants him 100 gVires:

user

VIRES in the system

Still locked VIRES = gVires

Already unlocked VIRES

gVires

Revenue share

Alice

100 ⓥ

50 ⓥ

50 ⓥ

50

25%

Bob

100 ⓥ

50 ⓥ

50 ⓥ

50

25%

Dave

100 ⓥ

100 ⓥ

0 ⓥ

100

50%

Dave commits twice more than Alice, so he receives twice more than her in revenue: This day, — Alice receives 2500 USDC, — Bob receives 2500 USDC, — Dave receives 5000 USDC;

As illustrated in the examples, gVires is proportional to the total amount of VIRES still locked by a given user.

At any time, anyone else can re-lock their stake.

Here’s how the picture changes if Alice decides to re-lock her VIRES:

user

VIRES in the system

Still locked VIRES

Already unlocked VIRES

gVires

Revenue share

Alice

100 ⓥ

100 ⓥ

0 ⓥ

100

40%

Bob

100 ⓥ

50 ⓥ

50 ⓥ

50

20%

Dave

100 ⓥ

100 ⓥ

0 ⓥ

100

40%

Last updated