Abax Documentation
  • 🧮Meet Abax!
    • Overview
    • Glossary
  • Lending
    • Collateral & Borrowing
    • Health Factor
    • Market Rules
    • Interest Rate Model
    • Liquidation
      • Liquidation Formula
    • Protocol Fee
  • Tokenomics
    • Abax Token
    • Public Contribution
    • Promotional Campaigns
  • How to Use Abax
    • How to Start Using Abax?
    • How Can I Make a Deposit?
    • How Do I Withdraw?
    • How Can I Borrow?
    • How Do I Repay Debt?
  • Governance
    • Governance System
  • Contracts
    • Lending Protocol
      • Lending Pool
        • Messages
          • Lending Pool Actions
          • Lending Pool Flash
          • Lending Pool Maintain
          • Lending Pool Manage
          • Lending Pool View
          • A Token Interface
          • V Token Interface
        • Storage
          • Types
          • Structs
        • Calculations
          • Interest Accumulation
          • Account Interest Accumulation
          • Rate Recalculation
          • Calculate Lending Power
        • Errors
    • Abax DAO
Powered by GitBook
On this page
  1. Contracts
  2. Lending Protocol
  3. Lending Pool
  4. Messages

Lending Pool Actions

fn choose_market_rule(
    &mut self,
    market_rule_id: RuleId,
) -> Result<(), LendingPoolError>;
fn set_as_collateral(
    &mut self,
    asset: AccountId,
    use_as_collateral: bool,
) -> Result<(), LendingPoolError>;
fn deposit(
    &mut self,
    asset: AccountId,
    on_behalf_of: AccountId,
    amount: Balance,
    data: Vec<u8>,
) -> Result<(), LendingPoolError>;
fn withdraw(
    &mut self,
    asset: AccountId,
    on_behalf_of: AccountId,
    amount: Balance,
    data: Vec<u8>,
) -> Result<Balance, LendingPoolError>;
fn borrow(
        &mut self,
        asset: AccountId,
        on_behalf_of: AccountId,
        amount: Balance,
        data: Vec<u8>,
    ) -> Result<(), LendingPoolError>;
fn repay(
    &mut self,
    asset: AccountId,
    on_behalf_of: AccountId,
    amount: Balance,
    data: Vec<u8>,
) -> Result<Balance, LendingPoolError>;
fn multi_op(        
    &mut self,
    actions: Vec<Action>,
    on_behalf_of: AccountId,
    data: Vec<u8>,
) -> Result<(), LendingPoolError>;
fn liquidate(
    &mut self,
    liquidated_account: AccountId,
    asset_to_repay: AccountId,
    asset_to_take: AccountId,
    amount_to_repay: Balance,
    minimum_recieved_for_one_repaid_token_e12: u128,
    data: Vec<u8>,
) -> Result<(Balance, Balance), LendingPoolError>;
PreviousMessagesNextLending Pool Flash

Last updated 1 year ago