Closed anilhelvaci closed 1 year ago
using a Promise to convey the quorumThreshold
violates the legibility requirements. Anyone who can see the questionDetails
would be able to see the Promise, but they wouldn't be able to tell what it will resolve to. I thought #41 had a proposal to update the quorumThreshold dynamically in a way that would lead to legibility.
The rest of your sketch seems like the right direction.
I thought https://github.com/anilhelvaci/dapp-pool-lending-protocol/issues/41 had a proposal to update the quorumThreshold dynamically in a way that would lead to legibility.
I think you're talking about updateTotalSupply.
using a Promise to convey the quorumThreshold violates the legibility requirements. Anyone who can see the questionDetails would be able to see the Promise, but they wouldn't be able to tell what it will resolve to.
I see where you're coming from, this makes sense. Using a promiseKit to update the quorumThreshold
was just a brain storm I did back when I first encountered this problem. The current design uses updateTotalSupply.
Think
test-lendingPoolElectorate
voting
andredeeming
? In commitee.js only tests foraddQuestion
exist.lendingPoolElectionManager
voting
andredeeming
here?I will probably have to use
offerTo
helper method because methods in theelectorateFacet
can be invoked via offers. Is this too costly?quorumTreshold
I want to use
binaryVoteCounter.js
contract for counting votes. However, we're required to do a token weighted voting. The current implementation of binaryVoteCounter contract expects aquorumTreshold
to enforce thequorumRule
. The problem is, in our case we don't know how many shares(tokens) will be used in voting. So if we wanted to do aMAJORITY
voting we would need to know how many tokens are locked for the question to calculate requiredquorumTreshold
for that particular question.Solution
One possible solution would be to pass a promise in voteCounter terms as the
quorumTreshold
instead of a bigint and a reference to a method that lives under theElectionManager
calledresolveTreshold
. The body of this method;We wrap the
makeBinaryVoteCounter
inside our own contract and implement a very similar scheduleClose method where it invokes aboveresolveTreshold
before invoking closeVoting and quorumQounter awaits this promise to resolve before starting to count quorum.