Unlock the power of composable contracts
CosmWasm provides the DeFi lego experience needed for complex cross-chain applications, with unparalleled security.
Prevents proxy, library conract, and reentrancy attacks
CosmWasm is a smart contract framework built to make appchain development and maintenance a breeze.
Provides the power and performance of native Cosmos SDK modules with a simpler developer experience
Unit tests, integration tests, and full backtraces are first-class citizens in CosmWasm
Smart contract upgrades are dead simple with CosmWasm's built-in permissioned, per-contract migrate function
Rust language performance and safety guarantees fast and memory-safe dapps
CosmWasm provides the DeFi lego experience needed for complex cross-chain applications, with unparalleled security.
Prevents proxy, library conract, and reentrancy attacks
CosmWasm's standard library offers a variety of specific functions and types to build secure DeFi protocols.
CosmWasm has already been used to build many DeFi protocols, like astroport's constant product pool smart contract, which utilizes the compute_swap
function in this snippet.
Check out the standard library docs and more at CosmWasm for a complete explanation of the pull potentiality.
use cosmwasm_std::{
//...
Addr, Decimal, Uint128, Coin,
//...
};
//...
pub fn compute_swap(
offer_pool: Uint128,
ask_pool: Uint128,
offer_amount: Uint128,
commission_rate: Decimal,
) -> StdResult<(Uint128, Uint128, Uint128)> {
Upload new code with a single transaction, no chain versioning required, or design your own approval workflow.
Easily customize approval workflows
Multisig Permissions
Semi-permissioned sign-off
Permissionless Deploys
Configurable deployment permissions
Validator Vote
Require validator approval to upgrade
Unsubscribe at any time. Privacy policy↗