Skip to main content

Contract upgrades

gDAI Vault is an upgradable contract. This is to minimize the impact on traders and stakers if the vault were to go through iterations. To protect stakers from potentially harmful upgrades, such as a compromised wallet submitting an upgrade, upgrades go through a 14-day timelock contract. The timelock duration is always longer than the maximum withdrawal delay.

Variable updates

gDAI Vault and the epoch system contain mutable state variables. Depending on the impact of updating a variable, it may only be updated by a 3 day or 14 day timelock contract. The following roles are in place:
  • GTokenAdmin - no timelock, for urgent actions that do not impact user funds.
  • GTokenManager - 3-day timelock, for non-urgent actions that do not impact user funds.
  • GTokenOwner - 14-day timelock, for non-urgent actions that could impact user funds.