AaveProtoGovernancecontract, which handles most of the logic for voting.
AssetVotingWeightProvidercontract, which whitelists and sets voting weight for assets.
AavePropositionPowercontract, which controls permissions for protocol governance such as registering a new proposal.
GovernanceParamsProvidercontract, which stores the global protocol governance parameters such as the threshold of proposition power needed to register a new proposal.
_votingBlocksDuration, if the voting
_thresholdhas been reached,
_thresholdhas not been reached, then the proposal will remain in the 'Voting' phase until the
challengeVoters()method. Votes are considered invalid if their vote token balance is currently lower than the vote token balance at the time of voting.
_maxMovesToVotingAllowed, after which it is considered 'Expired' if it has not passed.
_validatingBlocksDuration, the proposal is resolved and the status is changed to 'Executed'.
_thresholdhas been reached then the
execute()method of the proposal's
_proposalExecutoris called, implementing/executing the governance proposal code.
_thresholdhas not been reached, then no proposal code is executed.
try...catchpattern to iterate through proposal IDs, starting at index 0
submitVoteByVoter()again with the new vote, or cancel the vote with
function submitVoteByVoter(uint256 _proposalId, uint256 _vote, IERC20 _asset)
function cancelVoteByVoter(uint256 _proposalId)
function challengeVoters(uint256 _proposalId, address calldata _voters)
function getLimitBlockOfProposal(uint256 _proposalId)
function getLeadingChoice(uint256 _proposalId)
function getProposalBasicData(uint256 _proposalId)
function getVoterData(uint256 _proposalId, address _voterAddress)
function getVotesData(uint256 _proposalId)