Initialize the pool
Creator supplied:
admin - The Address for the adminname - The name of the pooloracle - The contract address of the oraclebackstop_take_rate - The take rate for the backstop (7 decimals)max_positions - The maximum number of positions a user is permitted to havemin_collateral - The minimum collateral required to open a borrow position in the oracles base assetPool Factory supplied:
backstop_id - The contract address of the pool's backstop moduleblnd_id - The contract ID of the BLND tokenfn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
name: soroban_sdk::String,
oracle: soroban_sdk::Address,
bstop_rate: u32,
max_positions: u32,
min_collateral: i128,
backstop_id: soroban_sdk::Address,
blnd_id: soroban_sdk::Address,
)
fn propose_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)
fn accept_admin(env: soroban_sdk::Env)
fn update_pool(
env: soroban_sdk::Env,
backstop_take_rate: u32,
max_positions: u32,
min_collateral: i128,
)
fn queue_set_reserve(
env: soroban_sdk::Env,
asset: soroban_sdk::Address,
metadata: ReserveConfig,
)
fn cancel_set_reserve(env: soroban_sdk::Env, asset: soroban_sdk::Address)
fn set_reserve(env: soroban_sdk::Env, asset: soroban_sdk::Address) -> u32
fn get_config(env: soroban_sdk::Env) -> PoolConfig
fn get_admin(env: soroban_sdk::Env) -> soroban_sdk::Address
fn get_reserve_list(env: soroban_sdk::Env) -> soroban_sdk::Vec
fn get_reserve(env: soroban_sdk::Env, asset: soroban_sdk::Address) -> Reserve
fn get_positions(env: soroban_sdk::Env, address: soroban_sdk::Address) -> Positions
fn submit(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
to: soroban_sdk::Address,
requests: soroban_sdk::Vec,
) -> Positions
fn submit_with_allowance(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
to: soroban_sdk::Address,
requests: soroban_sdk::Vec,
) -> Positions
fn flash_loan(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
flash_loan: FlashLoan,
requests: soroban_sdk::Vec,
) -> Positions
fn update_status(env: soroban_sdk::Env) -> u32
fn set_status(env: soroban_sdk::Env, pool_status: u32)
fn gulp(env: soroban_sdk::Env, asset: soroban_sdk::Address) -> i128
fn gulp_emissions(env: soroban_sdk::Env) -> i128
fn set_emissions_config(
env: soroban_sdk::Env,
res_emission_metadata: soroban_sdk::Vec,
)
fn claim(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
reserve_token_ids: soroban_sdk::Vec,
to: soroban_sdk::Address,
) -> i128
fn get_reserve_emissions(
env: soroban_sdk::Env,
reserve_token_index: u32,
) -> Option
fn get_user_emissions(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
reserve_token_index: u32,
) -> Option
fn new_auction(
env: soroban_sdk::Env,
auction_type: u32,
user: soroban_sdk::Address,
bid: soroban_sdk::Vec,
lot: soroban_sdk::Vec,
percent: u32,
) -> AuctionData
fn get_auction(
env: soroban_sdk::Env,
auction_type: u32,
user: soroban_sdk::Address,
) -> AuctionData
fn del_auction(env: soroban_sdk::Env, auction_type: u32, user: soroban_sdk::Address)
fn bad_debt(env: soroban_sdk::Env, user: soroban_sdk::Address)