Skip to content

Uniswap-inspired automated market-maker (AMM) protocol powered by Smart Contracts on the Orai blockchain.

License

Notifications You must be signed in to change notification settings

oraichain/oraiswap

Repository files navigation

OraiSwap

Uniswap-inspired automated market-maker (AMM) protocol powered by Smart Contracts on the Orai blockchain.

Contracts

Name Description
oraiswap_factory Proxy contract to create oraiswap_pair instance
oraiswap_oracle Global parameters updated by multisig wallet
oraiswap_pair Logic for building liquidity pool and trade between pair
oraiswap_router Facilitate multi-hop swap operations
oraiswap_orderbook Orderbook implementation
oraiswap_staking Stake LPs to get ORAIX reward
oraiswap_token (ERC20 equivalent) token implementation, AIRI, ORAIX

Running this contract

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

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown

You can run unit tests on this on each contracts directory via :

cargo unit-test
cargo integration-test

Gen proto definitions

# gen protobuf response.rs
cargo install protobuf-codegen
protoc --rust_out . response.proto
tee -a response.proto << END
impl ::std::convert::TryFrom<&[u8]> for MsgInstantiateContractResponse {
    type Error = ::protobuf::Error;

    fn try_from(value: &[u8]) -> Result<Self, Self::Error> {
       ::protobuf::Message::parse_from_bytes(value)
    }
}
END

About

Uniswap-inspired automated market-maker (AMM) protocol powered by Smart Contracts on the Orai blockchain.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages