diff --git a/README.md b/README.md index 34b82e5..c68fd01 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ # DAO Contracts -[![GitHub tag (with filter)](https://img.shields.io/github/v/tag/DA0-DA0/dao-contracts?label=Latest%20version&logo=github)](https://github.com/DA0-DA0/dao-contracts/releases/latest) -[![GitHub contributors](https://img.shields.io/github/contributors/DA0-DA0/dao-contracts?logo=github)](https://github.com/DA0-DA0/dao-contracts/graphs/contributors) - -[![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/DA0-DA0/dao-contracts?logo=git)](https://github.com/DA0-DA0/dao-contracts/pulse/monthly) -[![codecov](https://codecov.io/gh/DA0-DA0/dao-contracts/branch/main/graph/badge.svg?token=SCKOIPYZPV)](https://codecov.io/gh/DA0-DA0/dao-contracts) +[![GitHub tag (with filter)](https://img.shields.io/github/v/tag/DA0-DA0/dao-contracts?label=Latest%20version&logo=github)](https://github.com/securesecrets/Secret-DAODAO/releases/latest) [![Discord](https://img.shields.io/discord/895922260047720449?logo=discord&label=Discord)](https://discord.gg/MUBxdbwJDD) [![X (formerly Twitter) URL](https://img.shields.io/twitter/url?url=https%3A%2F%2Ftwitter.com%2FDA0_DA0&label=DA0_DA0)](https://twitter.com/DA0_DA0) @@ -12,9 +8,9 @@ [![DAO DAO DAO](https://img.shields.io/badge/DAO%20DAO%20DAO-gray?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAABGdBTUEAALGPC%2FxhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAR1QTFRF%2F%2F%2F%2F7%2FDw0NDRoaOjgoSFY2VmREdIJSgpFhgaBgkLNTc4sbKz0dHRREZINTc54ODgwMHCwMLCJSgpREZIoqOjNTc5VFZXoqOksbKz0dHRwcHCkpOUsbKyoqKjJikqc3V2g4SFoaGiwMDB7%2FDwoaKjFxk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%2BRV0GHp7in1lNyobYkX%2BR4qJLbj2HVealT1qBPiRbHFIM83VReWxx3w3D5pXwKIwm%2BWfzB2WvpLdogzPc6l8z5FNBrF4%2FkuxTsHvGt1FH4FETTIOdhxLeU5H%2FmDA2OaKG%2FWvz36UDyuGo04LhGBKYPEJ4xYvPLwBwqGmYsZWhhJjODMKIflADNi%2FyiSRYb44fddn8ljDfBcZMd7wp0%2B1SHJSbvswE%2FzmCNKyHPsAxf%2FdHhoOlxoGJPTYQchlVArgblnBlPy86Hx%2BbwMDbUxNYs21VbcsRX2mJmOAl794tKPhrr%2F9nM2stsL4sGwfOkTlhJAHbAIePWrK9loLrakEoN0SV49zky3kELmODwBiAC3oZB38L%2B50jiTN2JYMe4JDnP%2FUL9M65mer65q1ItqBlrxrLZImBVQ74PGzm9SQCrFrONv71wG1dsQA%2BDmx6oVa4eSqaymLuJ%2Fvn79Nx1KfnO6eRn3yZ7numaARGDsWv%2FsNCoWjYHJu7SEkvdSZJJYdHR%2BZH1yKqG9sdisrcQ%2FB4DdwwTKovbigfCkhiIpv9y6dv3X37JcutQCfzCUGgtR%2FgO61zuwRnnviwAAAABJRU5ErkJggg%3D%3D)](https://daodao.zone/dao/juno10h0hc64jv006rr8qy0zhlu4jsxct8qwa0vtaleayh0ujz0zynf2s2r7v8q) -This is a collection of smart contracts for building composable, modular, and upgradable DAOs. +This is a collection of smart contracts for building composable, modular, and upgradable DAOs on the Secret Network. -For a detailed look at how these contracts work, see [our wiki](https://github.com/DA0-DA0/dao-contracts/wiki/DAO-DAO-Contracts-Design). +For a detailed look at how these contracts work, see [our wiki](https://github.com/securesecrets/Secret-DAODAO/wiki/DAO-DAO-Contracts-Design). ## Overview @@ -30,49 +26,15 @@ For example, voting power might be based on [staked governance tokens](https://g Each module type has a [standard interface](https://github.com/DA0-DA0/dao-contracts/wiki/DAO-DAO-Contracts-Design). As a result, any voting module can be used with any proposal module, and any proposal module with any voting module. -The best way to get started is to create a DAO! We maintain an [open source](https://github.com/DA0-DA0/dao-dao-ui) frontend you can find at [daodao.zone](https://daodao.zone). +The best way to get started is to create a DAO! DAODAO maintain an [open source](https://github.com/DA0-DA0/dao-dao-ui) frontend you can find at [daodao.zone](https://daodao.zone). ## Audits If you believe you have found a problem, please [let us know](SECURITY.md). -DAO DAO has been audited by [Oak Security](https://www.oaksecurity.io/) on multiple occasions. You can find all the audit reports [here](https://github.com/oak-security/audit-reports/tree/master/DAO%20DAO). - -`v2.3.0` is the most recent DAO DAO release; only new feautres related to tokenfactory and improved NFT DAOs have been [audited](https://github.com/oak-security/audit-reports/blob/master/DAO%20DAO/2023-10-16%20Audit%20Report%20-%20DAO%20DAO%20Updates%20v1.0.pdf). Our most recently [full audited](https://github.com/oak-security/audit-reports/blob/master/DAO%20DAO/2023-02-06%20Audit%20Report%20-%20DAO%20DAO%202%20v1.0.pdf) release is `v2.0.0`. Vesting and payroll were added and [audited](https://github.com/oak-security/audit-reports/blob/master/DAO%20DAO/2023-03-22%20Audit%20Report%20-%20DAO%20DAO%20Vesting%20and%20Payroll%20Factory%20v1.0.pdf) in `v2.1.0`. - -Audited contracts include: -- [cw-payroll-factory](https://crates.io/crates/cw-payroll-factory) -- [cw-tokenfactory-issuer](https://crates.io/crates/cw-tokenfactory-issuer) -- [cw-token-swap](https://crates.io/crates/cw-token-swap) -- [cw-vesting](https://crates.io/crates/cw-vesting) -- [dao-dao-core](https://crates.io/crates/dao-dao-core) -- [dao-pre-propose-approval-single](https://crates.io/crates/dao-pre-propose-approval-single) -- [dao-pre-propose-approver](https://crates.io/crates/dao-pre-propose-approver) -- [dao-pre-propose-multiple](https://crates.io/crates/dao-pre-propose-multiple) -- [dao-pre-propose-single](https://crates.io/crates/dao-pre-propose-single) -- [dao-proposal-condorcet](https://crates.io/crates/dao-proposal-condorcet) -- [dao-proposal-multiple](https://crates.io/crates/dao-proposal-multiple) -- [dao-proposal-single](https://crates.io/crates/dao-proposal-single) -- [cw20-stake](https://crates.io/crates/cw20-stake) -- [cw20-stake-external-rewards](https://crates.io/crates/cw20-stake-external-rewards) -- [cw20-stake-reward-distributor](https://crates.io/crates/cw20-stake-reward-distributor) -- [dao-voting-cw4](https://crates.io/crates/dao-voting-cw4) -- [dao-voting-cw20-staked](https://crates.io/crates/dao-voting-cw20-staked) -- [dao-voting-cw721-staked](https://crates.io/crates/dao-voting-cw721-staked) -- [dao-voting-token-staked](https://crates.io/crates/dao-voting-token-staked) - -Audited packages include: -- [cw721-controllers](https://crates.io/crates/cw721-controllers) -- [cw-denom](https://crates.io/crates/cw-denom) -- [cw-hooks](https://crates.io/crates/cw-hooks) -- [cw-paginate-storage](https://crates.io/crates/cw-paginate-storage) -- [cw-stake-tracker](https://crates.io/crates/cw-stake-tracker) -- [cw-wormhole](https://crates.io/crates/cw-wormhole) -- [dao-dao-macros](https://crates.io/crates/dao-dao-macros) -- [dao-hooks](https://crates.io/crates/dao-hooks) -- [dao-interface](https://crates.io/crates/dao-interface) -- [dao-pre-propose-based](https://crates.io/crates/dao-pre-propose-based) -- [dao-voting](https://crates.io/crates/dao-voting) +DAO DAO (Not to be confused with Secret DAODAO) has been audited by [Oak Security](https://www.oaksecurity.io/) on multiple occasions. You can find all the audit reports [here](https://github.com/oak-security/audit-reports/tree/master/DAO%20DAO). + +Secret DAO DAO has yet to be audited. To understand more how Secret DAO DAO differentiates from DAO DAO please read further [here](https://github.com/securesecrets/Secret-DAODAO/wiki/DAO-DAO-Contracts-Design) ## Why? @@ -107,7 +69,7 @@ See [ci/integration-tests/README.md](ci/integration-tests/README.md) for more in ## Disclaimer -DAO DAO TOOLING IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT +SECRET DAO DAO TOOLING IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. No developer or entity involved in creating the DAO DAO UI or smart contracts will be liable for any claims or damages whatsoever associated with your use, inability to use, or your diff --git a/contracts/dao-dao-core/README.md b/contracts/dao-dao-core/README.md index 6eb8164..747552a 100644 --- a/contracts/dao-dao-core/README.md +++ b/contracts/dao-dao-core/README.md @@ -1,8 +1,5 @@ # dao-dao-core -[![dao-dao-core on crates.io](https://img.shields.io/crates/v/dao-dao-core.svg?logo=rust)](https://crates.io/crates/dao-dao-core) -[![docs.rs](https://img.shields.io/docsrs/dao-dao-core?logo=docsdotrs)](https://docs.rs/dao-dao-core/latest/dao_dao_core/index.html) - This contract is the core module for all DAO DAO DAOs. It handles management of voting power and proposal modules, executes messages, and holds the DAO's treasury. @@ -21,15 +18,12 @@ Core messages and interfaces are defined in the [dao-interfaces](../../packages/ ## Treasury management For management of non-native assets this contract maintains a list of -[cw20](https://github.com/CosmWasm/cw-plus/tree/1568d9f7796ef93747e5e5e45484447fddbea80b/packages/cw20) +[snip20](https://github.com/scrtlabs/snip20-reference-impl) and -[cw721](https://github.com/CosmWasm/cw-nfts/tree/c7be7aba9fb270abefee5a3696be62f2736592a0/packages/cw721) +[snip721](https://github.com/baedrik/snip721-reference-impl) tokens who's balances the DAO would like to track. This allows -frontends to list these tokens in the DAO's treasury. This tracking is -needed as, for non-native tokens, there is no on-chain data source for -all of the cw20 and cw721 tokens owned by a DAO. It may also help -reduce spam as random shitcoins sent to the DAO won't be displayed in -treasury listings, unless the DAO approves them. +frontends to list these tokens in the DAO's treasury. Note that in Secret DAO DAO, all +user balances are private, and therefore their voting power as well. For native tokens we do not need this additional tracking step, as native token balances are stored in the [bank @@ -42,42 +36,10 @@ which tokens the DAO owns. There are two ways that a non-native token may be added to the DAO treasury. -If `automatically_add_[cw20s|cw721s]` is set to true in the [DAO's +If `automatically_add_[snip20s|snip721s]` is set to true in the [DAO's config](https://github.com/DA0-DA0/dao-contracts/blob/74bd3881fdd86829e5e8b132b9952dd64f2d0737/contracts/dao-dao/src/state.rs#L16-L21), the DAO will add the token to the treasury upon receiving the token -via cw20's `Send` method and cw721's `SendNft` method. - -``` -pub enum ExecuteMsg { - /// Executed when the contract receives a cw20 token. Depending on - /// the contract's configuration the contract will automatically - /// add the token to its treasury. - #[cfg(feature = "cw20")] - Receive(cw20::Cw20ReceiveMsg), - /// Executed when the contract receives a cw721 token. Depending - /// on the contract's configuration the contract will - /// automatically add the token to its treasury. - ReceiveNft(cw721::Cw721ReceiveMsg), - // ... -} -``` +via snip20's `Send` method and snip721's `SendNft` method. The DAO may always add or remove non-native tokens via the -`UpdateCw20List` and `UpdateCw721List` methods: - -```rust -pub enum ExecuteMsg { - /// Updates the list of cw20 tokens this contract has registered. - #[cfg(feature = "cw20")] - UpdateCw20List { - to_add: Vec, - to_remove: Vec, - }, - /// Updates the list of cw721 tokens this contract has registered. - UpdateCw721List { - to_add: Vec, - to_remove: Vec, - }, - // ... -} -``` +`UpdateSnip20List` and `UpdateSnip721List` methods. \ No newline at end of file diff --git a/contracts/staking/snip20-stake-external-rewards/README.md b/contracts/staking/snip20-stake-external-rewards/README.md index 8bdc824..f49f232 100644 --- a/contracts/staking/snip20-stake-external-rewards/README.md +++ b/contracts/staking/snip20-stake-external-rewards/README.md @@ -1,7 +1,4 @@ -# CW20 Stake External Rewards - -[![cw20-stake-external-rewards on crates.io](https://img.shields.io/crates/v/cw20-stake-external-rewards.svg?logo=rust)](https://crates.io/crates/cw20-stake-external-rewards) -[![docs.rs](https://img.shields.io/docsrs/cw20-stake-external-rewards?logo=docsdotrs)](https://docs.rs/cw20-stake-external-rewards/latest/cw20_stake_external_rewards/) +# SNIP20 Stake External Rewards This contract enables staking rewards in terms of non-governance tokens. diff --git a/contracts/staking/snip20-stake/README.md b/contracts/staking/snip20-stake/README.md index 04c0f87..78ff276 100644 --- a/contracts/staking/snip20-stake/README.md +++ b/contracts/staking/snip20-stake/README.md @@ -1,7 +1,4 @@ -# CW20 Stake - -[![cw20-stake on crates.io](https://img.shields.io/crates/v/cw20-stake.svg?logo=rust)](https://crates.io/crates/cw20-stake) -[![docs.rs](https://img.shields.io/docsrs/cw20-stake?logo=docsdotrs)](https://docs.rs/cw20-stake/latest/cw20_stake/) +# SNIP20 Stake This is a basic implementation of a snip20 staking contract. Staked tokens can be unbonded with a configurable unbonding period. Staked