dao/
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.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
.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.veANGLE
contract, technical documentation can be found on Curve's website: