-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(governance): committee for parameter governance
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Contract Governance | ||
|
||
To help build systems with a good balance of decentralization and executive control, the Agoric platform includes, in addition to chain-wide governance included in the Cosmos SDK platform, an `@agoric/governance` package with a flexible archtecture supporting 3 main features: | ||
|
||
- Parameter Governance | ||
- API Governance | ||
- Offer Filters | ||
|
||
## Parameter Governance | ||
|
||
In [Starting a Contract Instance](../zoe/#starting-a-contract-instance), we saw that contracts are parameterized by _terms_. Parameter governance supports | ||
having an authorized party, the _electorate_, change such parameters while the contract is running. | ||
|
||
In [dapp-agoric-basics](https://github.com/Agoric/dapp-agoric-basics), the | ||
swaparoo contract has a governed `Fee` amount parameter: | ||
|
||
```js | ||
const paramTypes = harden( | ||
/** @type {const} */ ({ | ||
Fee: ParamTypes.AMOUNT, | ||
}), | ||
); | ||
``` | ||
|
||
## The `committee.js` Electorate Contract | ||
|
||
This dapp uses the `committee.js` contract from `@agoric/governance` for its | ||
electorate. The core eval deployment script starts the swaparoo committee, | ||
gets invitations, and sends them to the the smart wallets of the voters. | ||
In `test-vote-by-committee.js`, the committee consists of just 1 voter: | ||
|
||
<img src="./assets/gov-param-1.svg" | ||
style="border: 2px solid" width="600" /> |