mango-v4/programs/mango-v4/src/state/token_bank.rs

20 lines
485 B
Rust
Raw Normal View History

2022-02-22 04:31:18 -08:00
use anchor_lang::prelude::*;
use fixed::types::I80F48;
#[account(zero_copy)]
#[derive(Default)]
pub struct TokenBank {
/// native tokens deposited into or borrowed from this bank
pub deposits: u64,
pub borrows: u64,
// todo: multi-leg interest
// pub optimal_util: I80F48,
// pub optimal_rate: I80F48,
// pub max_rate: I80F48,
/// the index used to scale the value of an IndexedPosition
pub deposit_index: I80F48,
pub borrow_index: I80F48,
}