Skip to content

Instantly share code, notes, and snippets.

@arseneeth
Last active July 22, 2023 23:01
Show Gist options
  • Save arseneeth/d05a472fc74b1b28a99a9d39114bc4fc to your computer and use it in GitHub Desktop.
Save arseneeth/d05a472fc74b1b28a99a9d39114bc4fc to your computer and use it in GitHub Desktop.
Daoism Systems Smart Contracts Engineer Technical Challenge

Daoism Systems Smart Contracts Engineer Technical Challenge

The goal of this technical challenge is to demonstrate the challengers ability to:

  1. produce Solidity code
  2. innovate on Ethereum primitives
  3. follow best practices

Overview

The challenger would have to create a simple voting app, it could be a custom one or a similar to a solidity documentation example.

Voting weight of a voter should be based on their stake in the Balancer Pool. If the proposal is passed, it should be executed. The contract should allow stakers to add / remove Owners from the gnosis safe based on their voting weight as a result of the vote. This functionality should be demonstrated in a happy path simulation similar to the one here.

Example of a contract interaction flow:

(create proposal) => (vote on a proposal) => (execute proposal) => (add/remove owner)

Requirements

The challenger will take care of:

  1. Writing code according to the standards of the PrimeDAO contracts-v2 repo and based on the requirements stated earlier
  2. Testing their codebase
  3. Cleaning up the code and writing comments

Bonus

  1. Deploy to Rinkeby testnet
  2. Add a simple front-end
  3. Add test coverage tools and achieve 100% statement test coverage

Hints

  1. Check out PrimeDAO tests setup script for Balancer pool creation.
  2. GnosisSafe contract could be cloned locally and simplified by removing authorized modifier from functions in base/OwnerManager.sol.
  3. The proposals in this app should be dynamically added after the contract deployment. Proposal in itself have a command to execute a function in GnosisSafe in encoded form(for example, add owner to gnosis).
  4. If you want to implement GnosisSafe with authorised modifier, we recommend you to look intoexecTransaction function and checkTransaction function in the GnosisSafe.sol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment