Skip to content

Description of smart contract functionality

Rinke Hendriksen edited this page Sep 16, 2018 · 4 revisions

EtherTreasury

General

The Ether treasury registers who can spend funds and according to which parameters

Description of functions

  • spend can be called by an address with permission to spend to transfer Ether out of the DAO
  • increaseEtherAllowance can be called by an address with permission to spend to top-up their periodic allowance

Q&A

Master

General

The Master registers the hashes of the statutary goals and objectives of the DAO and makes sure all parameters can be updated when voted for

Description of functions

  • set[parameterNameHere] checks wether there exists a propopsal in the accepted state with as a subject the name of the parameter and udpates the parameter based on the effect in the effect field of the proposal. When possible there are guardrails to prevent accidentally setting a parameter to a value which is clearly too high or too low or to a value which would cause unwanted behavior of the DAO

Q&A

Slasher

General

The Slasher allows for anybody to slash participants. The goal of this contract is to nudge participants of the DAO to vote in accordance with the rules and objectives.

Description of functions

  • slashProposer slashes the proposer of a vote which did not get accepted by the community.
  • slashVoter slashes the person who voted in favor of a vote which did not get accepted.
  • slashNotVoted slashes the person who did not vote on a vote which he should have voted on.

Q&A

SponsorRegistry

General

The SponsorRegistry allows interested people to commit funds to the DAO. Afterwards, they will be able to produce a signature from the sponsorAddress, to make public their support to the cause of the DAO.

Description of functions

  • payTribute allows sponsors to send funds to the DAO. Note that this is not the only way to send funds to the DAO, since funds can be send via selfdestructing a contract.

Q&A

VoucherRegistry

General

The VoucherRegistry keeps track of the amount of voting tokens belonging to addresses and allows to modify these amounts.

Description of functions

  • vouchersOf returns the amount of vouchers for the address passed at function call
  • totalSupply returns the total amount of vouchers in existance
  • decreaseBalance internal function (callable by the Slasher contract), which decreases a given amount of vouchers for a given address.
  • mint_ internal function (callable by the VoucherTreasury contract), which increases a given amount of vouchers for a given address.

Q&A

VoucherTreasury

General

The voucher treasury registers who can mind voting tokens and according to which parameters.

Description of functions

  • mint allows an allowed address to mint vouchers to a given address.
  • increaseVoucherAllowance an allowed address is always bound by a budget per period. This function is called to top-up the budget at after a budget period has passed.
  • returnsMintAllowance returns the voucherAllowance for a given address, meaning wether he is allowed (isAllowed), what he can still mint during this budget period (allowance) when the last time was that he topped up his allowance (whenUpdated), after which period he can top-up again (budgetPeriod) and what his budget is per period (budget).

Q&A

Upgradable

General

the Upgradable contract keeps track of whether the contract is in a upgraded state and includes modifiers to adjust the behaviour of the DAO accordingly.

Description of functions

none

Q&A

VotingEngine

General

The VotingEngine contract makes sure proposals can be proposed and passed if there exists enough support from the community

Description of functions

ToDo

Q&A