Comment on page

Guild Controller

The GuildController contract is a central controller that maintains a list of guilds, weights, type weights and coordinates the rate of VRH production for each guild. It also maintains all the guild members and owners' information.
The guild receives a fraction of newly mined VRH tokens proportional to how much veVRH the guild has allocated.
When a user applies a new weight vote, it gets applied at the start of the next epoch week. The weight vote for anyone guild cannot be changed more than once in 10 days.
All the following events will trigger an update to next week's vote weight.
  1. 1.
    A new member joins the guild
  2. 2.
    An existing member leaves the guild
  3. 3.
    An existing member increases their locked VRH amount
  4. 4.
    An existing member increases their locked VRH time period
During the process of updating a guild's vote weight, the GuildController contract ensures that the resulting vote weight will take into account the decaying of the vote weight.
GuildController records the points (bias + slope) per guild in vote_points, and the scheduled changes in biases and slopes for those points will be recorded in vote_bias_changes and vote_slope_changes respectively.
Every user's slopes in their guild are stored in vote_user_slopes, together with the vote weight that has decayed and the time their vote-lock ends.
When a user changes to a new guild, the change is scheduled for the next epoch week. This will reduce the read pressure from storage and ensure the number of reads is proportional to the number of days since the user's last action, rather than all actions taken by the user.

Guild GAS Types

Each guild is assigned with a GAS type within the guild controller. Grouping guild by gas type allows the DAO to adjust the emissions according to type, making it possible to adjust emission for a single type.
The guild owner needs to specify a GAS type when creating a guild. Anyone can make a proposal add_gas_type in the VRH protocol. MOH is the first gas type in VRH and type = 0.

Create Guild

Any user who meets the requirement can create a guild from GuildController smart contract. The create_guild is connected to Aragon create_guild App. Refer to guild owner create guild for more details.

Add Type

Each guild is assigned with a gas type in the GuildController. A guild can only burn certain types of GAS that are specified when creating the guild. That means if a user holds GAS A, the user can not get a boost if the user joins a guild that gas type is GAS B.
VRH protocol allows different game platforms to join by adding a GAS type. Then players on different game platforms can join and mint VRH.
Adding Type action is connected to Aragon Ownership App that is different from Aragon create_guild App. Refer to Aragon DAO for more details.

Toggle Pause a Guild

Toggle pause status of a Guild.
This function may only be called by the ownership or emergency admins within the Aragon DAO.
A guild that is paused will not be able to mint VRH. All the members in this guild need to claim all rewards before pausing the guild. This should only be done in cases where a pool had to be killed due to a security risk.

Change Guild Template

VRH protocol has a template for Guild smart contract. All guild owners will initialize the guild from the template. The template can be upgraded and enriched with functions.
This function may only be called by the ownership admin within the Aragon DAO

Change GasEscrow Template

VRH protocol also has a template for GasEscrow smart contract. The GasEscrow contract will be initialized when add_type function is called from GuildController.
This function may only be called by the ownership admin within the Aragon DAO
Last modified 1yr ago