-
Notifications
You must be signed in to change notification settings - Fork 4
Description of smart contract functionality
The Ether treasury registers who can spend funds and according to which parameters
- 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
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
- 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
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.
- 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.
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.
- 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.
The VoucherRegistry keeps track of the amount of voting tokens belonging to addresses and allows to modify these amounts.
- 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.
The voucher treasury registers who can mind voting tokens and according to which parameters.
- 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).
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.
none
The VotingEngine contract makes sure proposals can be proposed and passed if there exists enough support from the community
ToDo