Skip to main content

Module defi

Module defi 

Source
Expand description

DeFi (Decentralized Finance) domain model.

This module gathers all constructs required to model on-chain markets and decentralized exchange (DEX) activity.

• chain - Blockchain networks supported by Nautilus (Ethereum, Arbitrum, …). • token - ERC-20 and other fungible token metadata. • dex - DEX protocol definitions (Uniswap V3, PancakeSwap, …). • data - Domain events & state snapshots that flow through the system (Block, PoolSwap). • types - Numeric value types (Money, Quantity, Price) shared across the DeFi layer. • rpc - Lightweight JSON-RPC types and parsers used by on-chain adapters.

Re-exports§

pub use amm::Pool;
pub use amm::SharedPool;
pub use chain::Blockchain;
pub use chain::Chain;
pub use chain::SharedChain;
pub use data::DefiData;
pub use data::block::Block;
pub use data::collect::PoolFeeCollect;
pub use data::fee_protocol_collect::PoolFeeProtocolCollect;
pub use data::fee_protocol_update::PoolFeeProtocolUpdate;
pub use data::flash::PoolFlash;
pub use data::liquidity::PoolLiquidityUpdate;
pub use data::liquidity::PoolLiquidityUpdateType;
pub use data::swap::PoolSwap;
pub use data::transaction::Transaction;
pub use dex::AmmType;
pub use dex::Dex;
pub use dex::DexType;
pub use dex::SharedDex;
pub use pool_analysis::PoolProfiler;
pub use pool_identifier::PoolIdentifier;
pub use token::SharedToken;
pub use token::Token;

Modules§

amm
Data types specific to automated-market-maker (AMM) protocols.
chain
Blockchain network identities and optional connection endpoints.
currency
Contract currency definitions and their DeFi presentation metadata.
data
DeFi (Decentralized Finance) data models and types.
dex
hex
Hexadecimal string parsing utilities for blockchain data.
pool_analysis
pool_identifier
reporting
Performance reporting and metrics tracking for blockchain operations.
rpc
tick_map
token
types
DeFi (Decentralized Finance) value type extensions.
validation
Validation utilities for blockchain data types.
wallet

Statics§

WEI_PRECISION
Number of decimal places used by the native Ether denomination.