Delegations
Regular Delegations
If you prefer not to participate directly in the voting process but trust a specific individual within the DAO, you have the option to delegate your funds to them. By doing so, the tokens you delegate are added to the total voting power of the delegatee (a.k.a. micropool). When the proposal that the delegatee voted on is executed, a specific percentage of rewards is directed to the delegatee, while the remaining portion is distributed proportionally among all delegators. This distribution of rewards takes into account the delegated amounts, ensuring a fair distribution among delegators based on their delegation amounts. When you delegate your assets, the delegatee's voting power increases in active proposals. This means there will be a revote that takes your delegated assets into consideration.
It's important to note that users can only vote using their entire delegated assets. Even if you vote with personal assets, the assets delegated to you will be automatically added to your votes. If the delegatedVotingAllowed parameter in proposal settings is set to false, then delegated to you assets won't be added to your vote. However, you will be able to vote with the assets you have delegated to someone else.
Below is an example illustrating how to delegate all available assets.
function delegate(IGovPool govPool) external {
(uint256 amount, uint256[] memory nftIds) = govPool.getWithdrawableAssets(address(this));
address delegatee = address(1);
govPool.delegate(delegatee, amount, nftIds);
}You also have the option to undelegate assets at any time. In this scenario, the delegatee will automatically revote in active proposals, excluding your assets.
function undelegate(IGovPool govPool) external {
(, address govUserKeeperAddress, , , ) = govPool.getHelperContracts();
IGovUserKeeper govUserKeeper = IGovUserKeeper(govUserKeeperAddress);
(, IGovUserKeeper.DelegationInfoView[] memory delegationsInfo) = govUserKeeper.delegations(
address(this),
false
);
for (uint256 i = 0; i < delegationsInfos.length; ++i) {
govPool.undelegate(
delegationsInfos[i].delegatee,
delegationsInfos[i].delegatedTokens,
delegationsInfos[i].delegatedNfts
);
}
}Last updated
