-
Notifications
You must be signed in to change notification settings - Fork 41
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 docs #1391
base: develop-combo-futarchy
Are you sure you want to change the base?
Add docs #1391
Conversation
/// The oracle evaluates to `true` if and only if the `positive_outcome` is more valuable than the | ||
/// `negative_outcome` in the liquidity pool specified by `pool_id`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be changed by audit fixes. It will then use a scoreboard.
type MinDuration: Get<BlockNumberFor<Self>>; | ||
|
||
// The type used to define the oracle for each proposal. | ||
/// The type used to define the oracle a proposal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// The type used to define the oracle a proposal. | |
/// The type used to define the oracle for a proposal. |
The oracle evaluates positively (meaning that it will allow the proposal to | ||
pass) if and only if the positive outcome is move valuable than the negative | ||
outcome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scoreboard
should be described here instead (look at audit fixes).
- A hard-coded origin (usually root) submits a proposal to be approved or | ||
rejected via futarchy. If the origin is root, this is done by running a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The newest version just uses the root origin, not a configurable hard-coded origin anymore.
/// If `force_max_work` parameter is set, the calculation will use up the maximum amount of work | ||
/// necessary, independent of the other parameters. Should only be used for benchmarking | ||
/// purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be changed to Fuel
parameter.
|
||
In addition to splitting and merging, combinatorial tokens can be redeemed if one of the markets involved in creating them has been resolved. For example, if the `XY` market above resolves to `X`, then every unit of `X & A` redeems for a unit of `A` and `Y & A` is worthless. If the scalar market above resolves so that `Long` is valued at `.4` and `Short` at `.6`, then every unit of `Yes & Long` redeems for `.4` units of `Yes` and every unit of `Yes & Short` redeems for `.6`. | ||
|
||
And important distinction which we've so far neglected to make is the distinction between an abstract _collection_ like `X & A` or `Yes & Short` and a concrete _position_, which is a collection together with a collateral token against which it is valued. Collections are purely abstract and used in the implementation. Positions are actual tokens on the chain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And important distinction which we've so far neglected to make is the distinction between an abstract _collection_ like `X & A` or `Yes & Short` and a concrete _position_, which is a collection together with a collateral token against which it is valued. Collections are purely abstract and used in the implementation. Positions are actual tokens on the chain. | |
An important distinction which we've so far neglected to make is the distinction between an abstract _collection_ like `X & A` or `Yes & Short` and a concrete _position_, which is a collection together with a collateral token against which it is valued. Collections are purely abstract and used in the implementation. Positions are actual tokens on the chain. |
|
||
And important distinction which we've so far neglected to make is the distinction between an abstract _collection_ like `X & A` or `Yes & Short` and a concrete _position_, which is a collection together with a collateral token against which it is valued. Collections are purely abstract and used in the implementation. Positions are actual tokens on the chain. | ||
|
||
Collections and position are identified using their IDs. When using the standard combinatorial ID Manager, this ID is a 256 bit value. The position ID of a certain token can be calculated using the collection ID and the collateral. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collections and position are identified using their IDs. When using the standard combinatorial ID Manager, this ID is a 256 bit value. The position ID of a certain token can be calculated using the collection ID and the collateral. | |
Collections and positions are identified using their IDs. When using the standard combinatorial ID Manager, this ID is a 256 bit value. The position ID of a certain token can be calculated using the collection ID and the collateral. |
|
||
- _Combinatorial token_: Any instance of `zeitgeist_primitives::Asset::CombinatorialToken`. | ||
- _Complete set (of a prediction market)_: An abstract set containing every outcome of a particular prediction market. One unit of a complete set is one unit of each outcome token from the market in question. After the market resolves, a complete set always redeems for exactly one unit of collateral. | ||
- _Merge_: The prcoess of exchanging multiple tokens for a single token of equal value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- _Merge_: The prcoess of exchanging multiple tokens for a single token of equal value. | |
- _Merge_: The process of exchanging multiple tokens for a single token of equal value. |
/// The `force_max_work` parameter can be used to force the `CombinatorialTokensApi` to | ||
/// spend the maximum amount of work, independently of the parameters that it is called | ||
/// with. This is useful for benchmarking purposes and should not be used in production. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be called Fuel
after the audit fixes.
/// | ||
/// # Complexity | ||
/// | ||
/// `O(n)` where `n` is the number of splits required to create the pool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will also depend on the Fuel
parameter.
/// The `force_max_work` parameter can be used to trigger the maximum amount of allowed work | ||
/// for the combinatorial ID manager. Should only be used for benchmarking purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Fuel
parameter after audit fixes.
/// The `force_max_work` parameter can be used to trigger the maximum amount of allowed work | ||
/// for the combinatorial ID manager. Should only be used for benchmarking purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Fuel
parameter after audit fixes.
/// The `force_max_work` parameter can be used to trigger the maximum amount of allowed work | ||
/// for the combinatorial ID manager. Should only be used for benchmarking purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Fuel
parameter after audit fixes.
What does it do?
What important points should reviewers know?
Is there something left for follow-up PRs?
What alternative implementations were considered?
Are there relevant PRs or issues?
References