Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for zrml-futarchy #89

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/learn/futarchy.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,40 @@ extrinsic improve the welfare measure? Once the decision is made, the code is
automatically executed or discarded. The laborious interpretation and
enforcement of ambiguous policy is no longer required.

## Futarchy on Zeitgeist

The futarchy pallet zrml-futarchy is introduced in v0.6.0 of Zeitgeist and
allows the Zeitgeist chain to govern itself using prediction markets. A
governance proposal can be submitted to zrml-futarchy using the
`submit_proposal` extrinsic. The only origin that is allowed to call this
extrinsic at the moment is root. Therefore, one must first submit a governance
proposal suggesting a call into zrml-futarchy's `submit_proposal` to
pallet-democracy first and let the token holders decide before going forward
with the proposal in zrml-futarchy. This ensures that the markets involved in
the proposal are properly configured and the pool is deep enough to ensure a
sane market.

Suppose that $X$ is the call that a user wishes to make. To do so, they first
create two markets:

- $M_0$: _Will $X$ be enacted?_
- $M_1$: _What's the welfare measure at time $T$?_

Then they create a combinatorial pool from these two markets. The outcomes in
the combinatorial pool will be:

- $L_+$: _Welfare measure long if $X$ enacted_
- $L_-$: _Welfare measure long if $X$ not enacted_
- $S_+$: _Welfare measure short if $X$ enacted_
- $S_-$: _Welfare measure short if $X$ not enacted_

The outcomes $L_{\bullet}$ can be used to measure the predicted success or
failure of the proposal: If the price of $L_+$ is greater than that of $L_-$,
the proposal is expected to be successful. We call these the _positive_ and
_negative outcomes_. When calling the `submit_proposal` extrinsic, this data is
specified as the `oracle` parameter, whose fields are `pool_id`,
`positive_outcome` and `negative_outcome`.
Comment on lines +178 to +180
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the example above there are two positive outcomes, one for L and one for S, right? (and two negative outcomes)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I expect two proposals to be submitted. One for L and one for S. Is this right? Then we have two pools, right? But this is also confusing from the standpoint that one can think about a pool that trades Welfare measure long if X enacted (L+) and Welfare measure short if X enacted (S+) and another pool that trades Welfare measure long if X not enacted (L-) and Welfare measure short if X not enacted (S-).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand I read this:

Zeitgeist's combinatorial tokens allow users to combine outcome tokens of several markets and trade these combined tokens in a single liquidity pool.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, just one positive and one negative outcome. The idea is to measure whether or not the welfare measure is higher if the proposal is enacted or not. This boils down to checking that L+ is more valuable to L-.


## Further Reading and Viewing

- [What is Futarchy? - Trading on The Future - Friederike Ernst #TOA18](https://www.youtube.com/watch?v=XonwBPXpyJQ)
Expand Down
24 changes: 0 additions & 24 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,6 @@ const config = {
{to: 'docs/category/learn', label: 'Learn', position: 'right'},
{to: 'docs/category/build', label: 'Build', position: 'right'},
{to: 'docs/faq', label: 'FAQ', position: 'right'},
{
type: 'search',
position: 'right',
},
{
type: "localeDropdown",
position: "right",
dropdownItemsAfter: [
{
href: "https://crowdin.com/project/zeitgeist-documentation",
label: "Help Us Translate",
},
],
},
],
},
footer: {
Expand Down Expand Up @@ -239,16 +225,6 @@ const config = {
// },
// }),
],

themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
hashed: true,
language: ["en", "zh"],
},
],
],
};

module.exports = config;
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@docusaurus/plugin-content-docs": "^2.0.0-beta.20",
"@docusaurus/plugin-content-pages": "^2.0.0-beta.20",
"@docusaurus/preset-classic": "^2.0.0-beta.20",
"@easyops-cn/docusaurus-search-local": "^0.25.0",
"@mdx-js/react": "^1.6.21",
"@polkadot/api": "^9.14.1",
"@polkadot/util": "^10.4.1",
Expand Down
Loading
Loading