The ZTRL protocol is governed and upgraded by ZTRL token-holders, using three distinct components; the ZTRL token, governance module (Governor Alpha), and Timelock. Together, these contracts allow the community to propose, vote, and implement changes through the administrative functions of a zToken or the ZTRLtroller. Proposals can include changes like adjusting an interest rate model, to adding support for a new asset.
Any address with more than 100,000 ZTRL delegated to it may propose governance actions, which are executable code. When a proposal is created, the community can submit their votes during a 3 day voting period. If a majority, and at least 400,000 votes are cast for the proposal, it is queued in the Timelock, and can be implemented after 2 days.
ZTRL is an ERC-20 token that allows the owner to delegate voting rights to any address, including their own address. Changes to the owner’s token balance automatically adjust the voting rights of the delegate.
Delegate votes from the sender to the delegatee. Users can delegate to 1 address at a time, and the number of votes added to the delegatee’s vote count is equivalent to the balance of ZTRL in the user’s account. Votes are delegated from the current block and onward, until the sender delegates again, or transfers their ZTRL.
Delegate votes from the signatory to the delegatee. This method has the same purpose as Delegate but it instead enables offline signatures to participate in ZTRL governance vote delegation. For more details on how to create an offline signature, review EIP-712.
Gets the balance of votes for an account as of the current block.
Gets the prior number of votes for an account at a specific block number. The block number passed must be a finalized block or the function will revert.
Governor Alpha is the governance module of the protocol; it allows addresses with more than 1,000,000 ZTRL to propose changes to the protocol. Addresses that held voting weight, at the start of the proposal, invoked through the getpriorvotes function, can submit their votes during a 3 day voting period. If a majority, and at least 4,000,000 votes are cast for the proposal, it is queued in the Timelock, and can be implemented after 2 days.
The required minimum number of votes in support of a proposal for it to succeed.
The minimum number of votes required for an account to create a proposal.
The maximum number of actions that can be included in a proposal. Actions are functions calls that will be made when a proposal succeeds and executes.
The number of Ethereum blocks to wait before voting on a proposal may begin. This value is added to the current block number when a proposal is created. This can be changed through governance.
The duration of voting on a proposal, in Ethereum blocks.
Create a Proposal to change the protocol. E.g., A proposal can set a zToken's interest rate model or risk parameters on the ZTRLtroller.
Proposals will be voted on by delegated voters. If there is sufficient support before the voting period ends, the proposal shall be automatically enacted. Enacted proposals are queued and executed in the ZTRL Timelock contract.
The sender must hold more ZTRL than the current proposal threshold (proposalThreshold()) as of the immediately previous block. If the threshold is 1,000,000 ZTRL, the sender must have been delegated more than 1% of all ZTRL in order to create a proposal. The proposal can have up to 10 actions (based on proposalMaxOperations()).
The proposer cannot create another proposal if they currently have a pending or active proposal. It is not possible to queue two identical actions in the same block (due to a restriction in the Timelock), therefore actions in a single proposal must be unique, and unique proposals that share an identical action must be queued in different blocks.
After a proposal has succeeded, any address can call the queue method to move the proposal into the Timelock queue. A proposal can only be queued if it has succeeded.
After the Timelock delay period, any account may invoke the execute method to apply the changes from the proposal to the target contracts. This will invoke each of the actions described in the proposal.
This function is payable so the Timelock contract can invoke payable functions that were selected in the proposal. E.g., A proposal can add reserves to a market like cETH, set a zToken's interest rate model, or set risk parameters on the ZTRLtroller.
Cancel a proposal that has not yet been executed. The Guardian is the only one who may execute this unless the proposer does not maintain the delegates required to create a proposal. If the proposer does not have more delegates than the proposal threshold, anyone can cancel the proposal.
Gets the actions of a selected proposal. Pass a proposal ID and get the targets, values, signatures and calldatas of that proposal.
Gets a proposal ballot receipt of the indicated voter.
Gets the proposal state for the specified proposal. The return value, ProposalState is an enumerated type defined in the Governor Alpha contract.
Cast a vote on a proposal. The account's voting weight is determined by the number of votes the account had delegated to it at the time the proposal state became active.
Cast a vote on a proposal. The account's voting weight is determined by the number of votes the account had delegated at the time that proposal state became active. This method has the same purpose as Cast Vote but it instead enables offline signatures to participate in ZTRL Governance voting. For more details on how to create an offline signature, review EIP-712.
Each zToken contract and the ZTRLtroller contract allow the Timelock address to modify them. The Timelock contract can modify system parameters, logic, and contracts in a 'time-delayed, opt-out' upgrade pattern.
The Timelock has a hard-coded minimum delay of 2 days, which is the least amount of notice possible for a governance action. Each proposed action will be published at a minimum of 2 days in the future from the time of announcement. Major upgrades, such as changing the risk system, may have a 14 day delay.
The Timelock is controlled by the governance module; pending and completed governance actions can be monitored on the Timelock Dashboard.
The ZTRLtroller contract designates a Pause Guardian address capable of disabling protocol functionality. Used only in the event of an unforeseen vulnerability, the Pause Guardian has one and only one ability: to disable a select set of functions: Mint, Borrow, Transfer, and Liquidate. The Pause Guardian cannot unpause an action, nor can it ever prevent users from calling Withdraw, or Repay Borrow to close positions and exit the protocol.
ZTRL token-holders designate the Pause Guardian address, which is currently held by ZTRL Labs, Inc.