A cw20 based DAO.

Related tags

Cryptography cw-dao
Overview

cw20 DAO

NOT PRODUCTION READY

This builds on cw3-flex-multisig and instead has the voting set maintained by cw20 tokens. This allows for the cw20s to serve as governance tokens in the DAO, similar to how governance tokens work using contracts like Compound Governance.

Instantiation

The first step to create such a DAO is to instantiate an cw20 contract.

When creating the DAO, in addition to the cw20 conrtract address you must set the required threshold to pass a vote as well as the max/default voting period.

Execution Process

First, a voter with an cw20 balance must submit a proposal. The proposer can set an expiration time for the voting process, or it defaults to the limit provided when creating the contract (so proposals can be closed after several days).

Before the proposal has expired, any voter with the required cw20 token can add their vote. Only "Yes" votes are tallied. If enough "Yes" votes were submitted before the proposal expiration date, the status is set to "Passed".

Once a proposal is "Passed", anyone with the correct cw20 token may submit an "Execute" message. This will trigger the proposal to send all stored messages from the proposal and update it's state to "Executed", so it cannot run again. (Note if the execution fails for any reason - out of gas, insufficient funds, etc - the state update will be reverted, and it will remain "Passed", so you can try again).

Once a proposal has expired without passing, anyone can submit a "Close" message to mark it closed. This has no effect beyond cleaning up the UI/database.

Complimentary Contracts

These contracts can be used in combination with the cw-dao contract to extend functionality. Simply make a proposal to instantiate them via the cw-dao.

  • cw-vest: Adds the ability to vest cw-20 tokens. Useful if you want community members to be incentivized over a longer term or for payments on projects that have multiple phases.

Running this contract

You will need Rust 1.44.1+ with wasm32-unknown-unknown target installed.

You can run unit tests on this via:

cargo test

Once you are happy with the content, you can compile it to wasm via:

RUSTFLAGS='-C link-arg=-s' cargo wasm
cp ../../target/wasm32-unknown-unknown/release/cw_dao.wasm .
ls -l cw_dao.wasm
sha256sum cw_dao.wasm

Or for a production-ready (optimized) build, run a build command in the repository root: https://github.com/CosmWasm/cosmwasm-plus#compiling.

Comments
  • Audit issue 4

    Audit issue 4

    @Callum-A @ezekiiel As in the audit written, admin can only withdraw the entire balance, not a partial withdrawal. I solved it by adding an amount field in ExecuteMsg::Withdraw that allows withdrawal of an amount token (0 < amount <= contract balance). Anh I also add test for invalid amount. Thank you guys for review. Close #326

    opened by Jammyaa 10
  • Optional DAO Admin

    Optional DAO Admin

    Use case: SubDAOs where the parent DAO wants to maintain control over the child DAO.

    This should probably go into the core DAO contract. Now some DAOs will not have any admin, but something like ExcuteMsg::AdminExecuteProposal could be very useful if a hierarchy is needed between a main DAO and its SubDAOs.

    There could additionally be an UpdateAdmin only callable by the current admin.

    v1 
    opened by JakeHartnell 10
  • Using `voting` in lib-crate makes this lib export `cw_core` functions on linux

    Using `voting` in lib-crate makes this lib export `cw_core` functions on linux

    Short description

    So, what happened: we have a lib that wants to import voting, and then contract depend on that lib, what happens: cw-core gets imported (with everything)

    Error

    note: rust-lld: error: duplicate symbol: instantiate
              >>> defined in /code/target/wasm32-unknown-unknown/release/deps/duplicate_bug.duplicate_bug.8f61a3e5-cgu.0.rcgu.o
              >>> defined in /code/target/wasm32-unknown-unknown/release/deps/libcw_core-bfb32c933257001e.rlib(cw_core-bfb32c933257001e.cw_core.0b07bdab-cgu.0.rcgu.o)
              
              rust-lld: error: duplicate symbol: execute
              >>> defined in /code/target/wasm32-unknown-unknown/release/deps/duplicate_bug.duplicate_bug.8f61a3e5-cgu.0.rcgu.o
              >>> defined in /code/target/wasm32-unknown-unknown/release/deps/libcw_core-bfb32c933257001e.rlib(cw_core-bfb32c933257001e.cw_core.0b07bdab-cgu.0.rcgu.o)
              
              rust-lld: error: duplicate symbol: query
              >>> defined in /code/target/wasm32-unknown-unknown/release/deps/duplicate_bug.duplicate_bug.8f61a3e5-cgu.0.rcgu.o
              >>> defined in /code/target/wasm32-unknown-unknown/release/deps/libcw_core-bfb32c933257001e.rlib(cw_core-bfb32c933257001e.cw_core.0b07bdab-cgu.0.rcgu.o)
    

    Minimal example

    https://github.com/Buckram123/duplicate_example This is minimal template from here: https://github.com/InterWasm/cw-template One difference is here: https://github.com/Buckram123/duplicate_example/blob/57859b4e0997b7eba359b3da393ae55f2b563d30/duplicate-bug/src/msg.rs#L1 And instantiate method

    Reproduce

    To reproduce on my machine, simply run optimizer or just wasm

    cargo build --release --target wasm32-unknown-unknown
    
    docker run --rm -v "$(pwd)":/code \
      --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
      --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
      cosmwasm/rust-optimizer:0.12.6
    

    Version

    rustc 1.63.0 (4b91a6ea7 2022-08-08), (optimizer uses 1.60.0) 5.19.8-arch1-1

    v2 
    opened by Buckram123 9
  • Add proposer field to Proposal

    Add proposer field to Proposal

    Addresses #136

    Adds proposer field to the Proposal which is populated by the sender of the propose message. Noticed the CW3 ProposalResponse struct does not have a proposer field. Does this need to be addressed separately?

    opened by Callum-A 9
  • Authorizations

    Authorizations

    This PR should replace #305 .

    The approach here is much simpler with the authorizations integrated into the proposals. We can discuss if this is the right approach, but the middleware approach added so much complexity that I don't think it's worth going that route.

    The most interesting part of this PR should be the message-filter contract implementation and its tests. Additionally the proposal tests should give an idea of how this would be used in a more realistic scenario.

    The PR is not production-ready, but I'd like to get some feedback before moving forward with the implementation.

    opened by nicolaslara 8
  • Hooks in staking contract

    Hooks in staking contract

    This PR adds the ability to add hooks to the staking contract, which are contracts that will be notified when users stake and unstake funds. This will allow cool features to be built on top of the staking contract such as delegated voting and external staking rewards.

    I have also taken made some improvements to the governance of modifying hooks as it is extremly high risk as an improper hook contract would lock all funds until the hook is removed. To better enable this, I have split the admin role into an owner and manager. The owner can add/remove hooks, change the owner, change the admin, and change the unbonding duration. The manager can do all of this excepct change the owner. This allows the DAO to delegate responsibilities of managing hooks to a more reponsive party such as a multisig while maintaining authority to remove the manager in case they attempt to lock funds.

    This is especially important in the wasmswap context as a staking contract would need to be instatiated and managed for each pool. The amount of management will most likely exceed the capacity of the whole DAO to make each individual contract change.

    TODO:

    Need to write actual tests for the hooks, but this requires a dummy contract to ensure hooks are functioning as intended.

    opened by ben2x4 8
  • Dissolving a DAO

    Dissolving a DAO

    Some users understandably want to "dissolve" or "delete" a DAO.

    Making 'deletion' work in practice will involve both the UI and the contracts. But, we may want to consider what we want that to look like from the contract perspective.

    I'm imagining a governance proposal with a message that changes

    • the title to "DEPRECATED - IGNORE"
    • the description to the same
    • maybe some other stuff?

    What do folks think?

    backlog 
    opened by elsehow 8
  • Add cw20-vest and compatibility updates to cw20-staked-balance-voting

    Add cw20-vest and compatibility updates to cw20-staked-balance-voting

    Hi all, this is my first foray into contributing to dao-dao, thanks in advance for considering.

    This is a generic vesting contract for locking up DAO tokens and releasing them to vestees over time according to per-vestee schedules. The vesting contract stakes tokens internally to accumulate funding rewards accrued before vested tokens are claimed. This contract integrates modularly with cw20-base and cw20-stake; there is no overlap in functionality with either. cwd-voting-cw20-staked required some changes in order to grant vestees full control over the voting power of their unvested shares.

    In a vacuum, usage of this contract goes like this:

    1. The contract is instantiated with a token contract, a staking contract, and a list of (address, vesting_schedule).
    2. The contract is now in an unfunded state. Once the contract is funded with the full amount to be vested over the lifetime of all vesting schedules, the contract "activates".
    3. Once the contract is activated, users can call "vest" on the contract begin the unstaking process for their vested shares. The unstaking_duration still applies here, but with some changes to cw20_stake that could be avoided.
    4. Finally, once a user's tokens in c20-vest are unstaked, they can be claimed with a call to "claim".
    5. From here the user will likely opt to restake the tokens or sell them.

    I also made changes to cwd-voting-cw20-staked to support instantiating/configuring cw20-vest at deploy time.

    A vesting schedule is a list of monotonically increasing points (timestamp, amount) which may be piecewise linearly interpolated to describe the total amount vested at any given time. Vesting cliffs can be implemented by making the first point's amount greater than 0 and in the future.

    Testing

    • cw20_stake has decent test coverage right now but I will be adding much more.
    • cwd-voting-cw20-staked has no tests of this functionality yet (hence the draft status)
    • existing tests are passing :)

    Open Questions

    • cw20-vest currently assumes usage with a cw20-stake contract. Is this a good assumption or should staking be optional?
    • I'm curious whether my query API design passes snuff with respect to conventions.
    opened by teddyknox 7
  • Implement Staked Native Token Voting module

    Implement Staked Native Token Voting module

    Related to #65.

    This is the simple version. Basically, we just implement the VotingPowerAtHeight query by querying a user's staked balance. AND THAT'S IT!

    Now querying a user's staked balance might be a bit tricky, but the AllDelagations query should return a list of the user's delegations and you can sum them up.

    opened by JakeHartnell 7
  • Bug Bounty Contracts

    Bug Bounty Contracts

    We're so close to being able to do bug bounty contracts (though a regular spend proposal would do in the meantime). It would be neat to have a "github is the oracle" integration so when the bug closes the (approved) contract auto-executes.

    backlog 
    opened by gavindoughtie 7
  • DAO images

    DAO images

    An image can really make a DAO pop, and it's in the designs... so we should add support for an optional image URL.

    IMO we might as well also do this for the multisig too...

    opened by JakeHartnell 7
  • Only allow migration to v2 a single time.

    Only allow migration to v2 a single time.

    Currently, while migrating from v1 to v2, we do not check that the migration has not already occured. This allows DAOs to vote to migrate more than once which is a bit of a footgun as migration overrides dao_uri and activates all proposal modules.

    Oak has kindly provided a test case for this <3

    #[test]
    fn test_replay_migrate() {
        // reproduced in contracts/dao-core/src/tests.rs
        use cw_core_v1 as v1;
        let mut app = App::default();
        let govmod_id = app.store_code(sudo_proposal_contract());
        let voting_id = app.store_code(cw20_balances_voting());
        let core_id = app.store_code(cw_core_contract());
        let v1_core_id = app.store_code(v1_cw_core_contract());
        let cw20_id = app.store_code(cw20_contract());
        let proposal_instantiate = dao_proposal_sudo::msg::InstantiateMsg {
            root: CREATOR_ADDR.to_string(),
        };
        let voting_instantiate = dao_voting_cw20_balance::msg::InstantiateMsg {
            token_info: dao_voting_cw20_balance::msg::TokenInfo::New {
                code_id: cw20_id,
                label: "DAO DAO voting".to_string(),
                name: "DAO DAO".to_string(),
                symbol: "DAO".to_string(),
                decimals: 6,
                initial_balances: vec![cw20::Cw20Coin {
                    address: CREATOR_ADDR.to_string(),
                    amount: Uint128::from(2u64),
                }],
                marketing: None,
            },
        };
        const OAK: &str = "oak";
        // let oak become the contract admin
        let v1_core_instantiate = v1::msg::InstantiateMsg {
            admin: Some(OAK.to_string()),
            name: "DAO DAO".to_string(),
            description: "A DAO that builds DAOs.".to_string(),
            image_url: None,
            automatically_add_cw20s: false,
            automatically_add_cw721s: false,
            voting_module_instantiate_info: v1::msg::ModuleInstantiateInfo {
            code_id: voting_id,
            msg: to_binary(&voting_instantiate).unwrap(),
            admin: v1::msg::Admin::CoreContract {},
            label: "voting module".to_string(),
        },
        proposal_modules_instantiate_info: vec![
            v1::msg::ModuleInstantiateInfo {
                code_id: govmod_id,
                msg: to_binary(&proposal_instantiate).unwrap(),
                admin: v1::msg::Admin::CoreContract {},
                label: "governance module 1".to_string(),
            },
            v1::msg::ModuleInstantiateInfo {
                code_id: govmod_id,
                msg: to_binary(&proposal_instantiate).unwrap(),
                admin: v1::msg::Admin::CoreContract {},
                label: "governance module 2".to_string(),
    }, ],
        initial_items: None,
    };
    // init contract with creator as migration admin
    let core_addr = app
        .instantiate_contract(
            v1_core_id,
            Addr::unchecked(CREATOR_ADDR),
            &v1_core_instantiate,
            &[],
            "cw-governance",
            Some(CREATOR_ADDR.to_string()),
    ) .unwrap();
    // creator performs normal migration
    app.execute(
        Addr::unchecked(CREATOR_ADDR),
        CosmosMsg::Wasm(WasmMsg::Migrate {
            contract_addr: core_addr.to_string(),
            new_code_id: core_id,
            msg: to_binary(&MigrateMsg::FromV1 { dao_uri: None }).unwrap(),
    }), )
    .unwrap();
    // oak disables one proposal module
    app.execute_contract(
        Addr::unchecked(OAK),
        Addr::unchecked(core_addr.to_string()),
        &ExecuteMsg::ExecuteAdminMsgs {
            msgs: vec![WasmMsg::Execute {
                contract_addr: core_addr.to_string(),
                msg: to_binary(&ExecuteMsg::UpdateProposalModules {
                    to_add: vec![],
                    to_disable: vec!["contract3".to_string()] })
                    .unwrap(),
                funds: vec![],
            }
    .into()], },
        &[],
    ).unwrap();
    // oak pauses the contract
    app.execute_contract(
        Addr::unchecked(OAK),
        Addr::unchecked(core_addr.to_string()),
        &ExecuteMsg::ExecuteAdminMsgs {
            msgs: vec![WasmMsg::Execute {
                contract_addr: core_addr.to_string(),
                msg: to_binary(&ExecuteMsg::Pause {
                    duration: Duration::Height(10),
                })
    .unwrap(),
                funds: vec![],
            }
    .into()], },
        &[],
    ).unwrap();
    // cannot do anything when paused
    app.execute_contract(
        Addr::unchecked(OAK),
        Addr::unchecked(core_addr.to_string()),
        &ExecuteMsg::ExecuteAdminMsgs {
            msgs: vec![WasmMsg::Execute {
                contract_addr: core_addr.to_string(),
                msg: to_binary(&ExecuteMsg::UpdateConfig {
    DAO".to_string(),
    config: Config {
        dao_uri: None,
        name: "The Empire Strikes Back".to_string(),
        description: "haha lol we have pwned your
        image_url: None,
        automatically_add_cw20s: true,
        automatically_add_cw721s: true,
    }, })
    .unwrap(),
                    funds: vec![],
                }
    .into()], },
            &[],
        ).unwrap_err();
        // creator replay migrate function to update dao_uri and enable all proposal
    modules
        let bad = Some("malicious".to_string());
        app.execute(
            Addr::unchecked(CREATOR_ADDR),
            CosmosMsg::Wasm(WasmMsg::Migrate {
                contract_addr: core_addr.to_string(),
                new_code_id: core_id,
                msg: to_binary(&MigrateMsg::FromV1 { dao_uri: bad.clone()
    }).unwrap(),
            }),
    ) .unwrap();
        // dao_uri is modified in PAUSED state
        let dao_uri: DaoURIResponse = app
            .wrap()
            .query_wasm_smart(core_addr.clone(), &QueryMsg::DaoURI {})
            .unwrap();
        assert_eq!(dao_uri.dao_uri, bad);
        // proposal module can be re-enabled in PAUSED state
        let new_state: DumpStateResponse = app
            .wrap()
            .query_wasm_smart(core_addr.clone(), &QueryMsg::DumpState {})
            .unwrap();
        let proposal_modules = new_state.proposal_modules;
        for (idx, module) in proposal_modules.iter().enumerate() {
    let prefix = derive_proposal_module_prefix(idx).unwrap();
    assert_eq!(prefix, module.prefix);
    assert_eq!(ProposalModuleStatus::Enabled, module.status);
    } }
    
    v2-audit 
    opened by 0xekez 0
  • Update github actions to use versions that support Node.js16

    Update github actions to use versions that support Node.js16

    opened by de-husk 1
  • Figure out how to share testing code across contracts

    Figure out how to share testing code across contracts

    i'd like to be able to write a testing helper method like make_proposal() -> Result<u64, ContractError> which i can use in both cwd_proposal_single and cwd_pre_propose_single.

    i'd also like the following to be true:

    1. i can use cw_multi_test in my make_proposal function.
    2. cw_multi_test does not get compiled for non-production builds.
    improvement 
    opened by 0xekez 3
  • Begin private voting docs

    Begin private voting docs

    Starting some documentation for how I suggest architecting private voting into the DAO DAO design.

    This is very WIP. If I get more time available during the week, will write up more on circuit design / other constraints!

    Rendered readme - gives higher level overview, and where its expected to sit in with other modules

    Rendered Spec - Intended to go into more details of cryptographic constructions, merkle trees involved, and client side UX. Still have a ways to go on this unfortunately

    Code - Not started yet

    opened by ValarDragon 1
Releases(v2.0.0-beta)
  • v2.0.0-beta(Nov 28, 2022)

    This release is the successor of v2.0.0-alpha. All contract and package versions have bumped from 0.2.0 to 2.0.0-beta.

    Highlights

    • DAOs may now require approval from a subDAO to create a proposal. - @JakeHartnell and @0xekez in https://github.com/DA0-DA0/dao-contracts/commit/f6dd78d5effce8470b8c511eda4c0338d3ebedbe
    • Votes may now be cast up to the expiration of a proposal allowing vote tallies to reflect voters who vote after a proposal's outcome has been determined. - @NinoLipartiia & @bekauz in https://github.com/DA0-DA0/dao-contracts/commit/a6e01eacbe3a50ff867d68cf0d2c27aeb4f7f649
    • Voters may now attach an optional rationale to their votes. - @0xekez in https://github.com/DA0-DA0/dao-contracts/commit/b02a7404d3bb50f1013d3a60c365950e20d2ccb9

    Bug fixes

    • Fixed an out-of-gas issue in dao-voting-cw721-staked. - @0xekez in https://github.com/DA0-DA0/dao-contracts/commit/38b955243d4bf696f3961ff19d1fd82bbe6aee7a, writeup
    • Fixed an integer overflow bug in cw20-stake. - @0xekez in https://github.com/DA0-DA0/dao-contracts/commit/a4f0874982b3ea8ee778ebb3439dda4eac25099c, writeup

    Breaking changes

    • The addr field of dao-core's SetItem { key, addr } message has been renamed to value and the message is now SetItem { key, value }.

    Testnet deployment

    The v2.0.0-beta contracts have been deployed to Juno's uni-5 testnet with the following code IDs:

    cw20_stake.wasm 3454
    cw_admin_factory.wasm 3455
    cw_token_swap.wasm 3456
    dao_core.wasm 3457
    dao_pre_propose_approval_single.wasm 3458
    dao_pre_propose_approver.wasm 3459
    dao_pre_propose_multiple.wasm 3460
    dao_pre_propose_single.wasm 3461
    dao_proposal_multiple.wasm 3462
    dao_proposal_single.wasm 3463
    dao_voting_cw20_staked.wasm 3464
    dao_voting_cw4.wasm 3465
    dao_voting_cw721_staked.wasm 3466
    dao_voting_native_staked.wasm 3467
    dao_voting_staking_denom_staked.wasm 3468
    stake_cw20_external_rewards.wasm 3469
    stake_cw20_reward_distributor.wasm 3470
    

    On the v0.16.0 release:

    cw20_base.wasm 3471
    cw4_group.wasm 3472
    
    Source code(tar.gz)
    Source code(zip)
    cw20_base.wasm(306.07 KB)
    cw20_stake.wasm(264.53 KB)
    cw4_group.wasm(203.89 KB)
    cw721_base.wasm(248.04 KB)
    cw_admin_factory.wasm(145.43 KB)
    cw_token_swap.wasm(172.59 KB)
    dao_core.wasm(417.74 KB)
    dao_pre_propose_approval_single.wasm(363.26 KB)
    dao_pre_propose_approver.wasm(269.85 KB)
    dao_pre_propose_multiple.wasm(312.93 KB)
    dao_pre_propose_single.wasm(307.04 KB)
    dao_proposal_multiple.wasm(472.76 KB)
    dao_proposal_single.wasm(494.87 KB)
    dao_voting_cw20_staked.wasm(267.00 KB)
    dao_voting_cw4.wasm(195.56 KB)
    dao_voting_cw721_staked.wasm(244.78 KB)
    dao_voting_native_staked.wasm(216.66 KB)
    dao_voting_staking_denom_staked.wasm(159.96 KB)
    stake_cw20_external_rewards.wasm(227.64 KB)
    stake_cw20_reward_distributor.wasm(177.59 KB)
  • v2.0.0-alpha(Oct 12, 2022)

    In many ways, this release represents the completion of the vision for version one. We've seen our designs work well in their first deployment and as such this release has few breaking changes. v2.0.0 serves mostly to refine our approach and build governance systems with it.

    This release was built by ten unique contributors over many time zones, degrees of psudoanonimity, and late nights. Great work everyone!

    Highlights

    • Multiple choice voting (A, B, ..., or C) by @blue-note.
    • NFT voting where voting power is determined by staked NFTs by @cypherape.
    • Integration of @de-husk's amazing integration testing library, Cosm-Orc, by @de-husk.
    • Proposal closing on execution failure by @Buckram123.
    • Explicit support for subDAO management in the core module by @onewhiskeypls.
    • Native token proposal deposits and pay-to-propose support by @0xekez.
    • Support for determining voting power based on staked native tokens (ex. ION) by @Callum-A.

    Bug fixes

    • Proposal deposits are returned to the core module when deposit refunds are not enabled instead of being left in the proposal module. Thank you @onewhiskeypls for discovering and reporting this!

    Breaking changes

    • cwd-core queries now use start_after instead of start_at in paginated queries.
    • cwd-proposal-single's QueryMsg::Vote { .. } is now QueryMsg::GetVote { .. }.

    Testnet code IDs

    On the uni-5 Juno testnet.

    cw20_base.wasm 870
    cw20_stake.wasm 871
    cw4_group.wasm 872
    cw_admin_factory.wasm 873
    cw_token_swap.wasm 874
    cwd_core.wasm 875
    cwd_pre_propose_multiple.wasm 876
    cwd_pre_propose_single.wasm 877
    cwd_proposal_multiple.wasm 878
    cwd_proposal_single.wasm 879
    cwd_voting_cw20_staked.wasm 880
    cwd_voting_cw4.wasm 881
    cwd_voting_cw721_staked.wasm 882
    cwd_voting_native_staked.wasm 883
    cwd_voting_staking_denom_staked.wasm 884
    stake_cw20_external_rewards.wasm 885
    stake_cw20_reward_distributor.wasm 886
    

    New Contributors

    • @cypherape made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/309
    • @Buckram123 made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/411
    • @bekauz made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/433
    • @ismellike made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/479
    • @CLHRAE made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/489

    Full Changelog: https://github.com/DA0-DA0/dao-contracts/compare/v1.0.0...v2.0.0

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Jun 24, 2022)

    This releases DAO DAO v1. The v1 contracts are governance Lego blocks. They are designed to be modular, secure, and upgradable allowing for safe, and highly customizable voting configurations. You can read more about their design here.

    The v1 contracts have completed two audits. The first by security DAO and the second by Oak Security.

    These contracts have been uploaded to the Juno mainnet and have the following code IDs:

    cw-proposal-single: 427
    cw-core: 432
    cw4-voting: 429
    cw20-stake: 430
    cw20-staked-balances-voting: 431
    cw20_base: 435
    cw4_group: 434
    

    The cw20_base and cw4_groups contracts are part of the cw-plus repo. For the above code IDs we are using commit 14f4e922fac9e2097a8efa99e5b71d04747e340a.

    Instructions for verifying contracts that are deployed based on this release can be found here.

    This release corresponds to the v2.0.0 release of the @dao-dao/types package which contains a types and convenience functions for querying these contracts.

    These contracts have also been uploaded to the juno testnet with the following code IDs:

    cw-proposal-single: 453
    cw-core: 452
    cw4-voting: 450
    cw20-stake: 449
    cw20-staked-balances-voting: 451
    cw20_base: 77
    cw4_group: 78
    

    New Contributors

    • @borgbob made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/323
    • @de-husk made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/318

    Full Changelog: https://github.com/DA0-DA0/dao-contracts/compare/v0.3.0...v1.0.0

    Source code(tar.gz)
    Source code(zip)
    cw20_stake.wasm(247.01 KB)
    cw20_staked_balance_voting.wasm(259.33 KB)
    cw4_voting.wasm(192.33 KB)
    cw_core.wasm(349.49 KB)
    cw_named_groups.wasm(173.51 KB)
    cw_names_registry.wasm(188.34 KB)
    cw_proposal_single.wasm(420.51 KB)
    stake_cw20_external_rewards.wasm(224.13 KB)
    stake_cw20_reward_distributor.wasm(168.80 KB)
  • v0.3.0(Apr 19, 2022)

    Many improvements and bug fixes for the legacy contracts.

    What's Changed

    • Make admin optional stake cw20 by @ben2x4 in https://github.com/DA0-DA0/dao-contracts/pull/163
    • cw3-flex-multisig fixes by @Callum-A in https://github.com/DA0-DA0/dao-contracts/pull/162
    • Add start_height field to proposal queries by @ezekiiel in https://github.com/DA0-DA0/dao-contracts/pull/165
    • updates rust optimizer in deploy local script by @gavindoughtie in https://github.com/DA0-DA0/dao-contracts/pull/167
    • feat: adds Apple Silicon support, updates junod to v2.1.0 in deploy_local by @bmorphism in https://github.com/DA0-DA0/dao-contracts/pull/168
    • Remove cw-distribution by @Callum-A in https://github.com/DA0-DA0/dao-contracts/pull/174
    • Vt only signers execute by @verminator23 in https://github.com/DA0-DA0/dao-contracts/pull/166
    • Reject proposals when they cannot pass by @Callum-A in https://github.com/DA0-DA0/dao-contracts/pull/181
    • Automatically add cw20s to balance list by @Callum-A in https://github.com/DA0-DA0/dao-contracts/pull/183
    • Remove usage of Addr in contract messages. by @ezekiiel in https://github.com/DA0-DA0/dao-contracts/pull/186
    • Instantiate DAO with existing staking contract by @Callum-A in https://github.com/DA0-DA0/dao-contracts/pull/189
    • Update local deploy script by @the-frey in https://github.com/DA0-DA0/dao-contracts/pull/201
    • fix local deploy script by @janitachalam in https://github.com/DA0-DA0/dao-contracts/pull/211
    • Hooks in staking contract by @ben2x4 in https://github.com/DA0-DA0/dao-contracts/pull/180
    • Fix threshold for no for non v1 side contracts by @Callum-A in https://github.com/DA0-DA0/dao-contracts/pull/220
    • External staking rewards by @ben2x4 in https://github.com/DA0-DA0/dao-contracts/pull/182
    • fix empty attribute bug in external staking contract by @ben2x4 in https://github.com/DA0-DA0/dao-contracts/pull/245

    Full Changelog: https://github.com/DA0-DA0/dao-contracts/compare/v0.2.5...v0.3.0

    Source code(tar.gz)
    Source code(zip)
    address_manager.wasm(166.99 KB)
    checksums.txt(602 bytes)
    checksums_intermediate.txt(618 bytes)
    cw3_dao.wasm(400.20 KB)
    cw3_multisig.wasm(387.05 KB)
    cw4_registry.wasm(182.66 KB)
    cw_distribution.wasm(124.24 KB)
    stake_cw20.wasm(249.30 KB)
    stake_cw20_external_rewards.wasm(252.97 KB)
  • v0.2.5(Jan 31, 2022)

    These contracts have not been audited yet. Use at your own risk.

    What's Changed since v0.2.0

    • Stake cw20 delegate voting power by @ben2x4 in https://github.com/DA0-DA0/dao-contracts/pull/127
    • Vote delegation by @JakeHartnell in https://github.com/DA0-DA0/dao-contracts/pull/129
    • Query staking changelog by @ben2x4 in https://github.com/DA0-DA0/dao-contracts/pull/130
    • Get change log height is optional by @ben2x4 in https://github.com/DA0-DA0/dao-contracts/pull/135
    • Add code for muilti-sig contract to have empty bracket by @entrancedjames in https://github.com/DA0-DA0/dao-contracts/pull/137
    • Add optional img url to dao by @entrancedjames in https://github.com/DA0-DA0/dao-contracts/pull/138
    • Add proposer field to Proposal by @Callum-A in https://github.com/DA0-DA0/dao-contracts/pull/140
    • auto-compound staking by @ben2x4 in https://github.com/DA0-DA0/dao-contracts/pull/139
    • Add a security disclosure policy by @elsehow in https://github.com/DA0-DA0/dao-contracts/pull/143
    • Remove changelog from staking contract by @ben2x4 in https://github.com/DA0-DA0/dao-contracts/pull/145
    • Add cw2 info to stake-cw20 by @orkunkl in https://github.com/DA0-DA0/dao-contracts/pull/144
    • feat: allow admin to update unstaking duration for stake cw20 by @verminator23 in https://github.com/DA0-DA0/dao-contracts/pull/142
    • Contributors' guide and code of conduct by @elsehow in https://github.com/DA0-DA0/dao-contracts/pull/150
    • Update spacing in poem by @elsehow in https://github.com/DA0-DA0/dao-contracts/pull/151
    • Prep for launch by @JakeHartnell in https://github.com/DA0-DA0/dao-contracts/pull/149
    • Fix LICENSE link by @maurolacy in https://github.com/DA0-DA0/dao-contracts/pull/152
    • Don't allow creation of claims if >= 100 are outstanding by @ezekiiel in https://github.com/DA0-DA0/dao-contracts/pull/148
    • Use latest staking contract version in gov staking contract by @ezekiiel in https://github.com/DA0-DA0/dao-contracts/pull/153
    • Add UpdateStakingContract method and tests by @JakeHartnell in https://github.com/DA0-DA0/dao-contracts/pull/154
    • Implement PauseDAO, closes #146 by @JakeHartnell in https://github.com/DA0-DA0/dao-contracts/pull/155
    • Remove stake_cw20_gov by @JakeHartnell in https://github.com/DA0-DA0/dao-contracts/pull/156

    New Contributors

    • @Callum-A made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/140
    • @verminator23 made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/142
    • @maurolacy made their first contribution in https://github.com/DA0-DA0/dao-contracts/pull/152

    Full Changelog: https://github.com/DA0-DA0/dao-contracts/compare/v0.2.0...v0.2.5

    Source code(tar.gz)
    Source code(zip)
Owner
Jake Hartnell
Jake Hartnell
A Multi-chain Decentralized Exchange (DEX) built on CosmWasm for the WYND DAO.

WynDex A Multi-chain Decentralized Exchange (DEX) built on CosmWasm for the WYND DAO. Overview License The initial pool types were copied from astropo

null 7 Jan 31, 2023
Helper library for interacting with Terra assets (SDK coins and CW20 tokens)

terra-asset Helpers for interacting with Terra assets, including native coins and CW20 tokens Usage This crate contains two struct types: AssetInfo st

larry 9 Jan 3, 2022
Examples of cw20 usage, extracted from cw-plus, maintained by the community

CosmWasm Tokens This is a collection of cw20-related contracts extracted from cw-plus. These serve as examples of what is possible to build and as sta

CosmWasm 59 Jan 2, 2023
A Secure Capability-Based Runtime for JavaScript Based on Deno

Secure Runtime secure-runtime, as the name implies, is a secure runtime for JavaScript, designed for the multi-tenant serverless environment. It is an

Gigamono 7 Oct 7, 2022
Parity-Bridge — Bridge between any two ethereum-based networks

Deprecated Bridges This repo is deprecated. Originally it contained the ETH <> ETH-PoA bridge (see tumski tag). Later it was repurposed for ETH-PoA <>

Parity Technologies 314 Nov 25, 2022
rabe is an Attribute Based Encryption library, written in Rust

Rabe rabe is a rust library implementing several Attribute Based Encryption (ABE) schemes using a modified version of the bn library of zcash (type-3

Fraunhofer AISEC 52 Dec 15, 2022
A Rust library for lattice-based additive homomorphic encryption.

Cupcake Cupcake is an efficient Rust library for the (additive version of) Fan-Vercauteren homomorphic encryption scheme, offering capabilities to enc

Facebook Research 365 Dec 11, 2022
EXPERIMENTAL: Bitcoin Core Prometheus exporter based on User-Space, Statically Defined Tracing and eBPF.

bitcoind-observer An experimental Prometheus metric exporter for Bitcoin Core based on Userspace, Statically Defined Tracing and eBPF. This demo is ba

0xB10C 24 Nov 8, 2022
Ruo is a dictionary-based password cracker written in rust 🦀 .

Ruo is a dictionary-based password cracker written in rust ?? . The primary purpose is to crack weak hashes/commonly used passwords.

Asjid Kalam 10 Mar 6, 2022
The Voting example based on MoonZoon and Solana + Anchor framework.

The Voting example based on MoonZoon and Solana + Anchor framework.

Martin Kavík 6 Aug 13, 2022
Marinde Anchor-Based, first on mainnet, liquid-staking-program and mSOL->SOL swap pool

marinade-anchor Marinade-finance liquid staking program for the Solana blockchain Audits & Code Review Kudelski Security: https://marinade.finance/Kud

Marinade.Finance 42 Dec 11, 2022
A Substrate-based PoA node supporting dynamic addition/removal of authorities.

Substrate PoA A sample Substrate runtime for a PoA blockchain that allows: Dynamically add/remove authorities. Automatically remove authorities when t

Gautam Dhameja 10 Jun 16, 2022
Multi Party Key Management System (KMS) for Secp256k1 Elliptic curve based digital signatures.

Key Management System (KMS) for curve Secp256k1 Multi Party Key Management System (KMS) for Secp256k1 Elliptic curve based digital signatures. Introdu

[ZenGo X] 61 Dec 28, 2022
A pairing-based threshold cryptosystem for collaborative decryption and signatures used in HoneybadgerBFT implementation

threshold_crypto A pairing-based threshold cryptosystem for collaborative decryption and signatures. The threshold_crypto crate provides cryptographic

null 166 Dec 29, 2022
Rust-based file hashing program

Rash A file hashing tool written in Rust Command line application for calculating the hash value of a file. Rash uses the RustCrypto collection of lib

Stuart Reilly 6 Sep 16, 2022
Rusty Hog is a secret scanner built in Rust for performance, and based on TruffleHog which is written in Python.

Rusty Hog is a secret scanner built in Rust for performance, and based on TruffleHog which is written in Python. Rusty Hog provides the following bina

New Relic 306 Jan 4, 2023
Bessie - an authenticated, chunked cipher based on BLAKE3

Bessie Bessie is an authenticated, chunked cipher based on BLAKE3. Right now it's in the early design stages. See design.md. Although the Bessie ciphe

Jack O'Connor 12 Dec 9, 2022
Polkadex - An Orderbook-based Decentralized Exchange using the Substrate Blockchain Framework.

What is Polkadex? ?? Polkadex is a Open Source, Decentralized Exchange Platform made using Substrate Blockchain Framework that provides traders with t

Polkadex 243 Dec 16, 2022
CKB's vm, based on open source RISC-V ISA

Nervos CKB VM About CKB VM CKB VM is a pure software implementation of the RISC-V instruction set used as scripting VM in CKB. Right now it implements

Nervos Network 297 Jan 3, 2023