-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Walk through all README.md files and update or correct any incorrect …
…spots
- Loading branch information
Showing
13 changed files
with
44 additions
and
83 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
# Enterprise facade | ||
|
||
This contract retains the original Enterprise's query API and several execute messages that do not take into | ||
account the sender. | ||
This contract retains the original Enterprise's API. | ||
|
||
It allows the frontend and indexers to retain the old API, even though the structure of Enterprise contracts has been | ||
significantly revamped since the original. | ||
|
||
This contract will simply take an Enterprise address, determine which version it is, and forward the calls to an | ||
appropriate version of another facade contract. | ||
appropriate version of the version-specific facade contract. |
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
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
# Enterprise governance controller | ||
|
||
Enterprise governance controller is a contract that binds the logic of enterprise-governance contract together with | ||
A contract that binds the logic of enterprise-governance contract together with | ||
membership contracts, and executes proposals centrally, dispatching messages to other contracts as needed. | ||
|
||
This contract has privileges over other contracts (it's set to their admin, usually) that allows it to control all their | ||
settings and privileged behaviors. | ||
|
||
The contract contains several big pieces of functionality: | ||
|
||
- Proposal meta-data (proposal actions, which membership type it is associated with, etc.) | ||
- General-members-type governance (creating proposals, voting on them, and executing them) | ||
- Council-type governance, where a council of select members is defined to run specific types of proposals |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# Enterprise governance | ||
|
||
A contract for managing Enterprise's proposals. | ||
A contract for managing Enterprise's polls. | ||
Essentially a proxy to the poll-engine library. | ||
|
||
Mainly serves to: | ||
|
||
- create and store essential proposal data (proposer, voting period, quorum, threshold) | ||
- calculate appropriate proposal status when trying to execute or query it. | ||
|
||
|
||
Does not validate voters or calculate their voting power. | ||
Does not validate who can vote or calculate their voting power. |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Enterprise outposts | ||
|
||
Enterprise outposts contract deals with treasuries deployed to other chains. | ||
This contract deals with treasuries deployed to other chains. | ||
|
||
It keeps a registry of proxies and treasuries for each of the chains where they're deployed, and handles the logic | ||
of instantiating them. | ||
of instantiating them and communicating with them. |
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# Enterprise versioning contract | ||
|
||
A contract for managing Enterprise's versions. | ||
Contains all the different contracts' code IDs for each of Enterprise's versions, so that we can migrate | ||
DAOs easily to new versions and use matching code IDs for each of the contracts. | ||
|
||
Serves as a global repository that maps Enterprise's versions to code IDs used for all DAO-specific contracts for that | ||
Enterprise version. | ||
|
||
Deploying a new Enterprise version is done essentially by adding a new version mapping here. |
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 |
---|---|---|
@@ -1,13 +1,6 @@ | ||
# Enterprise | ||
|
||
Enterprise contract represents a single DAO and holds all its belonging assets (staked governance assets, proposal deposits, and treasury). | ||
Enterprise contract is the central 'repository' holding all the other DAO contracts together (has all their addresses). | ||
It also holds the DAO's metadata (name, logo, etc.). | ||
|
||
The contract contains several big pieces of functionality: | ||
- Membership management and queries | ||
- General-members-type governance (creating proposals, voting on them, and executing them) and staking of governance assets | ||
- Council-type governance, where a council of select members is defined to run specific types of proposals | ||
- Treasury definition and queries | ||
|
||
## Dependencies | ||
|
||
The contract relies on reference [CW20](https://github.com/CosmWasm/cw-plus/tree/main/contracts/cw20-base) and [CW721](https://github.com/CosmWasm/cw-nfts/tree/main/contracts/cw721-base) implementations to create and run token and NFT DAOs, respectively. | ||
Additionally, it is the on-chain admin for all the other contracts, so it performs migrations on them. |
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 |
---|---|---|
@@ -1,21 +1,25 @@ | ||
# Funds distributor | ||
|
||
A contract for distributing a DAO's funds to its stakers. | ||
A contract for distributing a DAO's funds to its members. | ||
|
||
Receives funds and updates indices on how many funds each user can claim. | ||
Users can then query and claim their share of the distributed funds. | ||
|
||
Relies on Enterprise contract to inform it of any changes in staking. | ||
|
||
|
||
## How rewards are stored and calculated | ||
|
||
The method for calculating a user's rewards for each individual asset is as follows: | ||
|
||
1. A global index for the asset is tracked, denoting how many units of the asset have been rewarded per user weight since the beginning of time. | ||
1. A global index for the asset is tracked, denoting how many units of the asset have been rewarded per user weight | ||
since the beginning of time. | ||
2. For each user and a given asset, we store their pending (unclaimed) rewards. | ||
3. In addition to pending rewards, we store each user's reward index for the given asset. This index represents the last global index of the asset at which we calculated the user's pending rewards. | ||
|
||
- Whenever we distribute new rewards for an asset, we simply increase its global index by (new amount distributed / total weight of eligible users). | ||
- Whenever the user's weight changes, we calculate the rewards accrued since we last updated their rewards indices, and we add that to their pending rewards, setting their reward index to the global index. | ||
- Whenever a user claims their rewards, we send them their pending rewards plus anything accrued since last calculation of their pending rewards. Then we set pending rewards to 0, and their index to current global index. | ||
3. In addition to pending rewards, we store each user's reward index for the given asset. This index represents the last | ||
global index of the asset at which we calculated the user's pending rewards. | ||
|
||
- Whenever we distribute new rewards for an asset, we simply increase its global index by (new amount distributed / | ||
total weight of eligible users). | ||
- Whenever the user's weight changes, we calculate the rewards accrued since we last updated their rewards indices, and | ||
we add that to their pending rewards, setting their reward index to the global index. | ||
- Whenever a user claims their rewards, we send them their pending rewards plus anything accrued since last calculation | ||
of their pending rewards. Then we set pending rewards to 0, and their index to current global index. |
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
# NFT staking membership | ||
# ICS721 callback proxy | ||
|
||
A contract for managing an NFT (CW721) staking membership for an Enterprise DAO. | ||
Essentially a proxy to the nft-staking library. | ||
A proxy that implements Ark's ICS721 contract's callbacks. | ||
|
||
Mainly serves to: | ||
- store users' NFT stakes | ||
- provide an interface to stake, unstake, and claim user NFTs | ||
- provide queries for user and total stakes, and user claims | ||
Allows receiving of callbacks together with incoming NFTs, and enables forwarding them to specific DAOs. | ||
|
||
Meant as a single global instance that works for all DAOs. |
This file was deleted.
Oops, something went wrong.