Expand description
Broad import surface for vault consumers.
Prefer use templar_common::vault::prelude::*; at call sites that need
most vault types, constants, and wad/math helpers.
Re-exports§
pub use super::event::AllocationPositionIssueKind;pub use super::event::Event;pub use super::event::PositionReportOutcome;pub use super::event::QueueAction;pub use super::event::QueueStatus;pub use super::event::Reason;pub use super::event::UnbrickPhase;pub use super::event::WithdrawProgressPhase;pub use super::event::WithdrawalAccountingKind;pub use super::require_at_least;pub use super::storage_bytes_for_account_id;pub use super::AllocationDelta;pub use super::AllocationPlan;pub use super::AllocationWeights;pub use super::Delta;pub use super::DepositMsg;pub use super::Error;pub use super::EscrowSettlement;pub use super::Fee;pub use super::FeeAccrualAnchor;pub use super::Fees;pub use super::IdleBalanceDelta;pub use super::IdleResyncOutcome;pub use super::Locker;pub use super::MarketConfiguration;pub use super::MarketId;pub use super::PendingWithdrawal;pub use super::RealAssetsReport;pub use super::ResyncIdleReport;pub use super::VaultConfiguration;pub use super::external::*;pub use super::gas::*;pub use super::params::*;pub use super::restrictions::*;
Structs§
- Actual
Idx - Actual index reached during processing.
- CapGroup
Id - CapGroup
Record - Record tracking the state of a cap group.
- Expected
Idx - Expected index in a queue or plan.
- Number
- A 256-bit unsigned integer wrapper for precise arithmetic.
- Timestamp
Ns - Timestamp in nanoseconds.
- Wad
- An 18-decimal fixed-point value (1e18 = 100%), backed by U256.
Enums§
- CapGroup
Update - A cap-group governance update (shared across chains).
- CapGroup
Update Key - Identifies a cap-group governance update for accept/revoke operations.
Constants§
- MAX_
FEE_ WAD - Backwards-compatible alias for
MAX_PERFORMANCE_FEE_WAD. - MAX_
MANAGEMENT_ FEE_ WAD - Maximum annualized management fee rate: 5%.
- MAX_
PERFORMANCE_ FEE_ WAD - Maximum performance fee rate on profits: 50%.
Functions§
- compute_
fee_ shares - Computes fee shares to mint given:
- compute_
fee_ shares_ from_ assets - Computes fee shares to mint from a raw
fee_assetsamount, given current total assets and supply. Returns 0 when fee is zero, supply is zero, or fee consumes all assets. - mul_
div_ ceil - Multiplies and divides with ceiling: ceil(x * y / denom). Uses 512-bit intermediate (U512) to avoid overflow; returns 0 if denom is 0. Implemented via quotient/remainder to avoid relying on addition overflow behavior.
- mul_
div_ floor - Multiplies and divides with flooring: floor(x * y / denom). Uses 512-bit intermediate (U512) to avoid overflow; returns 0 if denom is 0.
- mul_
wad_ floor - Multiplies x by
y/Wad::SCALEand floors: floor(x * y / 1e18). y is a WAD-scaled fraction (1e18 = 100%), and x is an unscaled amount.
Type Aliases§
- WIDE
- Wider type for intermediate calculations.