0

I'm trying to write a contract which function calls are dependent of majority consensus from whitelisted users. E.g. the owner of the contract can initiate a transfer out of the contract, however, the transfer will only go through if majority consensus between whitelisted users are achieved. How can this be architectured?

1

You want to achieve something similar to a multisig wallets. You need the majority of the owners to approve a proposal before it is executed.

Someone sends a proposal. The contracts generates a proposal id hashing the proposal parameters. Other owners call approve with the proposal id, a vote counter is incremented and when the majority is reached the proposal can be executed. Now the original proposer is enabled to call the contract to execute the proposal.

  • do you have an example of such multisig source code? thanks ismael – NowsyMe May 7 '18 at 13:07
  • You can use Gnosis' MultisigWallet as starting point. – Ismael May 7 '18 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.