Comment on page

Guild

VRH inflation is directed to holders of veVRH who are in a guild. The exact amount of VRH to be received by veVRH holders is calculated in the Guild smart contract.
Every guild created will have its own Guild contract with a unique contract address, and the GuildController contract will record the vote weight of every guild.
Whenever a user in a guild performs a mint action on the Minter contract, 30% of the VRH mined will be released to the user immediately and the remaining 70% will be divided into 6 periods to be vested over 168 days (6 × 4 weeks). A user can claim their vested tokens anytime at the beginning of each period.
To participate in VRH mining, users must lock their VRH and acquire veVRH to represent their vote in a guild. The actual amount of VRH to be distributed to each user in a guild will be affected by the following factors:
  • The current inflation rate of VRH (will be reduced by
    21/42^{1/4}
    each year)
  • The total voting power of the guild that the user belongs to
  • The amount of VRH locked by the user (balance of veVRH decays over time)
  • The amount of GAS burned for boosting rewards (GAS is obtained by burning game tokens)
Assuming
rr
represents the inflation rate of VRH that changes once every year,
wgw_g
represents the guild's vote ratio and
wtw_t
represents the guild gas type weight. Every guild will receive a portion of the VRH distribution according to the following formula:
rn=wgwtrr_n = w_g * w_t * r
The result of the above formula will change whenever
wgw_g
,
wtw_t
or when the inflation rate changes.
To calculate the user's share in
rnr_n
, we use the integral:
Iu=ru(t)bu(t)S(t)dtI_u = \int\frac{r_u(t)b_u(t)}{S(t)}dt
, where
bu(t)b_u(t)
is the balance of veVRH of a user voting for a guild,
S(t)S(t)
is the total effective balance of veVRH of all users in a guild, depending on the time
tt
; the value
IuI_u
gives the amount of VRH which the user has mined.
bu(t)b_u(t)
will change as the veVRH of the user changes.
SS
will change whenever a user veVRH change (
SS
can change as many times as needed in-between the two events for that user). In the GameGuild contract, the value of
IuI_u
is recorded in the integrate_fraction mapping.
In order to avoid all users having to perform a checkpoint frequently, we constantly record the values of the following integral (named integrate_inv_supply in the contract):
Iis(t)=0tru(t)S(t)dtI_{is}(t) = \int_0^t\frac{r_u(t)}{S(t)}dt
The value of
IisI_{is}
is recorded at any point any user joins, leaves a guild or updates working balance, as well as every time the rate
rur_u
changes.