mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-05-19 15:39:28 +00:00
Adds a new `SyncReserves` instruction that updates a pool's recorded reserves to match the actual vault balances. This allows the pool to absorb donations (direct token transfers to vaults) without breaking the invariant — only upward adjustments are permitted; vaults may not be under-collateralized relative to reserves. Vault reading helpers (`read_fungible_holding`, `read_vault_fungible_balances`) are implemented in `amm_core` so they can be shared across instructions without crossing crate boundaries.
12 lines
157 B
Rust
12 lines
157 B
Rust
//! The AMM Program implementation.
|
|
|
|
pub use amm_core as core;
|
|
|
|
pub mod add;
|
|
pub mod new_definition;
|
|
pub mod remove;
|
|
pub mod swap;
|
|
pub mod sync;
|
|
|
|
mod tests;
|