ANGLE and veANGLE - Governance Token
Angle Protocol governance token and its locked version

1. Introduction

The dao/ folder of the code contains all the files and contracts related to Angle governance. It comprises the following contracts:
  • ANGLE.sol: the contract for the protocol's governance token: the ANGLE token. This contract was forked from OpenZeppelin's ERC20Votes contract.
  • veANGLE.sol: the contract for locking ANGLE tokens. This contract was forked from Curve votingEscrow.vy contract. Compared with Curve, this contract was made upgradeable.
The dao/ folder also contains some deprecated contracts which were used in production but that are no longer useful in the protocol:
  • Governor.sol: this contract is upgradeable. It is an implementation of OpenZeppelin's GovernorUpgradeable, GovernorProposalThresholdUpgradeable, GovernorCountingSimpleUpgradeable, GovernorVotesUpgradeable and GovernorTimelockControlUpgradeable contracts inspired from Compound's Governor Bravo. It was at the level of this contract that governance proposals were made, that governance token owners voted or delegated their votes, and that proposals were accepted. Now all voting takes place on Snapshot and is implemented by a governance multisig.
  • Timelock.sol: Each accepted governance proposition goes went the Timelock, before it was executed. This contract was forked from OpenZeppelin's Timelock Controller.
For details about the veANGLE token and its uses with respect to the ANGLE token, you can refer to this section in the docs.

2. Contracts Details

The veANGLE contract was made upgradeable by simply adding an initialized variable that is set to true in the constructor as well as in the initialize function. This prevents the contract's implementation from being taken over and the initialize function to be called twice.

3. Key Mechanisms and Implementation

For a more detailed documentation about the functions in the ANGLE contract, the following documentation links from Compound and OpenZeppelin may be useful:
Compound | Docs - Governance
Governance - OpenZeppelin Docs
About the veANGLE contract, technical documentation can be found on Curve's website:
Curve DAO: Vote-Escrowed CRV β€” Curve 1.0.0 documentation