Skip to content

Commit

Permalink
docs(governance): committee for parameter governance
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Mar 14, 2024
1 parent 1561bb4 commit 9e7166d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions main/guides/governance/index.md
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" />

0 comments on commit 9e7166d

Please sign in to comment.