Shawn Anderson
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Generalized Proposal Inverter The idea is to define the generalized proposal inverter. [![hackmd-github-sync-badge](https://hackmd.io/Id2t4vybRE-_QWwKqgs_KA/badge)](https://hackmd.io/Id2t4vybRE-_QWwKqgs_KA) ## State | Name | Symbol | Definition | initial value| | -------- | -------- | -------- | -- | | Allocated Funds | $A$ | $A = \sum_{i\in \mathcal{B}} a_i$ | 0| | Unallocated Funds | $R$ | $F-A$ | 140| | Total Funds | $F$ | | 140| | Committed Brokers | $\mathcal{B}$ | | $\emptyset$| | Number of Brokers | $n$ | $n=\vert\mathcal{B}\vert$ |0| | Broker Claimable Funds | $a_i$| | 0| | Broker Stake| $s_i$ | | 5 (=$s_\min$) | | Total Broker Stake | $S$ | $S=\sum_{i\in \mathcal{B}} s_i$|0 | | Horizon | $H$ | $\frac{R}{\Delta A}$| 20$\left(=\frac{F}{\Delta A}\right)$ ## Parameters | Name | Symbol | Definition | initial value| | -------- | -------- | -------- | -- | | Minimum Stake | $s_{\min}$ | $s_i\ge \sigma$ | 5| | Epoch Length | $\Delta t$ | | 1 day | | Min Epochs | $\tau$| | 28 | Allocation Per Epoch | $\Delta A$| | 10 | | Min Horizon | $H_{\min}$| |7| | Min Brokers | $n_{\min}$| |1| | Max Brokers | $n_{\max}$| |5| ## Mechanisms ![](https://i.imgur.com/12NhGZc.png) ### Owner Owner can be brokers or Payers or both #### Deploy An actor within the ecosystem can deploy a new agreement contract by specifying which proposal the agreement supports, setting the parameters of the smart contract providing initial funds, and providing any (unenforced) commitment to continue topping up the contract as payer under as long as a set of SLAs are met. For the purpose of this draft, it is assumed that the contract is initialized with some quantity of funds $F$ such that $H>H_{\min}$ and that $\mathcal{B} = \emptyset$. #### Cancel In the event that the owner closes down a contract, each Broker gets back their stake, and recieves any unclaimed tokens allocated to their address as well an equal share of the remaining unallocated assets. That is to say the quantity $\Delta d_i$ of data tokens is distributed to each broker $i \in \mathcal{B}$ $$\Delta d_i = s_i + a_i + \frac{R}{N}$$ and thus the penultimate financial state of the contract is $$S=0\\ R = 0\\ A = 0 $$ when the contract is self-destructed. #### Forced Cancel There may conditions under which any address may trigger the cancel but these conditions should be indicative of a failure on the part of the payer. An example policy would be to allow forced cancel when $n < n_{\min}$ and $H<H_\min$, and possibly only if this is the case for multiple epochs. ### Payer A payer, who may or may not be the owner may contribute funds to the agreement in order to ensure its continued existence. #### Pay A payer takes the action pay by providing a quantity of tokens (split into Stablecoins and DAO tokens) $\Delta F$ which increased the unallocated funds (and thus also the total funds). $$ F^+ = F+\Delta F\\ R^+ = R + \Delta F$$ Furthermore, the Horizon $H$ is increased $$ H^+ = \frac{R+\Delta F}{\Delta A} = H + \frac{\Delta F}{\Delta A}$$ ### Synthetic State Change The synthetic state change is a change the contract state that is not realized until later. In this case the automatic allocation of funds from the pool $R$ to the pool $A$ is implicit. For reference see geyser contracts, although rewards each participant is entitled to are determinstic, they are not actually resolved until they make a claim, see broker actions. Per epoch $t$ of length $\Delta t$, let $\mathcal{B}_t$ be the set of brokers $i\in \mathcal{B}$ for the entirety of the epoch, and if $n_t= \vert \mathcal{B}_t\vert>n_\min$ then $$a_i^+ = a_i +\frac{\Delta A}{n_t}\\ A^+ = A+\Delta A\\ R^+=R-\Delta A$$ Note that $F^+ = F$ so no tokens are actually flowing, this book-keeping reflects the amount of funds broker $i$ will recieve in the event that they make a claim or other payout event occurs. Furthmore, if $n_t= \vert \mathcal{B}_t\vert<n_\min$, payments are not issued as the terms of the agreement are not considered met, and additional allocations are not accrued for the passage of epoch $t$: $$a_i^+ = a_i\\ A^+ = A\\ R^+=R$$ If having one broker suffices then setting $n_\min=1$ is recommended. Above, I have considered a very simple conditional allocation policy, that provides a fixed reward of $\Delta A$ per epoch $\Delta t$ evenly over the brokers in the agreement as long as the minimum broker count is met. This is placeholder logic, both the total flow and the allocation rule can be state dependent. An example alternative would be to release an amount of funds which is a scale factor on the total tokens staked up to some cap: $\Delta A = \max (\gamma S, \Delta A_\max)$, where each broker received $\Delta a_i = a_i^+-a_t= \gamma s_i$ unless the cap was met. ### Broker #### Join A broker $i$ can join the agreement by staking $s_i\ge \sigma$ $$ \mathcal{B}^+ = \mathcal{B} \cup \{i\}\\ S^+ = S+s_i $$ Note that if the act of joining would cause $\vert \mathcal{B}^+ \vert > n_\max$ then joining would fail. It is not possible for more than $n_\max$ brokers to be party to this agreement. Furthermore, it is possible to enforce addition access control via whitelists or blacklists which serve to restrict access to the set $\mathcal{B}$. These lists may be managed by the owner, the payers, and/or the brokers; however, scoping an addition access control scheme is out of scope at this time. #### Claim A broker is attached to agreement can claim their accumulated rewards at their discretion. $$A^+= A-a_i \\ F^+= F-a_i$$ Note that while this decreases the total funds in the contract it does not decrease the unallocated (remaining) funds in the conract because claims only extract claims according to a deterministic rule computed over the past. Many brokers may choose to claim their funds more or less often depending on opportunity costs and gas costs. Preferred implementations may vary -- see section on synthetics state. #### Leave In the event that the horizon is below the threshold $H<H_\min$ or a broker has been attached to the agreement for more than $\tau$ epochs a broker may exit an agreement and take their stake (and outstanding claims): $$\mathcal{B}^+ = \mathcal{B}-\{i\}\\ S^+ = S-s_i \\ A^+= A-a_i \\ F^+= F-a_i$$ The broker recieves the balance $s_i + a_i$. However if a broker has not stayed for the entire period $\tau$ or the contract is not running low on funds, the stake will be kept as payment by the agreement contract when the broker leaves $$\mathcal{B}^+ = \mathcal{B}-\{i\}\\ S^+ = S-s_i \\ A^+= A-a_i \\ F^+= F+s_i-a_i$$ The broker only recieves $a_i$. In a more extreme case we may require the broker to relinquish the claim on $a_i$ as well but this would easily be skirted by making a claim action before leaving.

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully