From 1792a0f81fbbddb0ee4b4c4f8fc8c0265a30a68c Mon Sep 17 00:00:00 2001 From: Rebegea Dragos-Alexandru Date: Wed, 27 Sep 2023 12:10:39 +0300 Subject: [PATCH] add quadratic computation for voting power --- energy-integration/governance-v2/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index c914e3a95..31abb3f78 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -161,7 +161,7 @@ pub trait GovernanceV2: let new_user = self.user_voted_proposals(&voter).insert(proposal_id); require!(new_user, ALREADY_VOTED_ERR_MSG); - let voting_power = &user_quorum; + let voting_power = &user_quorum.sqrt(); match self.get_root_hash(proposal_id) { OptionalValue::None => {