PCV Guardian
Motivation
The PCV guardian is a smart contract in the Volt system that allows for quick removal of PCV from whitelisted yield venues into a safe address during times of duress or crisis. This will enable the Volt Protocol to act in the interests of its token holders to preserve PCV and reduce the risk of principal loss.
The PCV Guardian is a contract to safeguard protocol funds by being able to withdraw whitelisted PCV deposits to an immutable safe address. The PCV Guardian contract is a contract able safeguard PCV funds by withdrawing PCV deposits to a safe address, inspired by Fei's PCV Guardian contract with some slight changes.
Safe Address
There is a single immutable safe address funds can be withdrawn to, which on mainnet is the protocol multisig. PCV deposit addresses can only be withdrawn from, if whitelisted. There is only one function to withdraw funds as VOLT is only dealing with ERC20 tokens. There are 3 notable roles in regards to this contract, the GOVERNOR, GUARDIAN and PCV_GUARD roles. All 3 roles are able to withdraw funds from whitelist PCV deposits, to the immutable safe address. The GOVERNOR is able to both whitelist and un-whitelist new PCV deposit addresses, whereas the GUARDIAN is only able to un-whitelist PCV deposit addresses.
PCV_GUARD Role
The PCV_GUARD role is granted to addresses by the GOVERNOR role, while it can be revoked from addresses by both GOVERNOR and GUARDIAN. To achieve this, the PCVGuardAdmin contract is used. The AccessControl contract only allows for one admin for each role, to circumvent this we use the PCVGuardAdmin to act an intermediary between access control, and the PCV_GUARD role.
Role Hierarchy
The GOVERNOR is the admin of the PCV_GUARD_ADMIN role. The PCV_GUARD_ADMIN is the admin of the PCV_GUARD role.
PCV Guard Admin
The PCVGuardAdmin contract gets the PCV_GUARD_ADMIN role, this allows both GOVERNOR and GUARDIAN to be able to call into the contract to revoke PCV_GUARD roles, when necessary.