kujira_ghost/market/
execute.rs1use cosmwasm_schema::cw_serde;
2use cosmwasm_std::{Addr, Decimal, Uint128};
3use kujira_std::CallbackMsg;
4
5#[cw_serde]
6pub enum ExecuteMsg {
7 Deposit(DepositMsg),
9 Withdraw(WithdrawMsg),
11 Borrow(BorrowMsg),
13 Repay(RepayMsg),
15 Liquidate(LiquidateMsg),
17 SelfLiquidate { amount: Option<Uint128> },
19 Callback(CallbackMsg),
21 UpdateConfig(ConfigUpdate),
23}
24
25#[cw_serde]
26pub enum CallbackType {
27 BorrowCallback {
29 receiver: Addr,
30 added_debt_shares: Uint128,
31 expected_borrow_return: Uint128,
32 },
33 LiquidateCallback { position_holder: Addr },
35}
36
37#[cw_serde]
38pub struct DepositMsg {
39 pub position_holder: Option<Addr>,
42}
43
44#[cw_serde]
45pub struct WithdrawMsg {
46 pub amount: Uint128,
47 pub withdraw_to: Option<Addr>,
48}
49
50#[cw_serde]
51pub struct BorrowMsg {
52 pub amount: Uint128,
53}
54
55#[cw_serde]
56pub struct RepayMsg {
57 pub position_holder: Option<Addr>,
60}
61
62#[cw_serde]
63pub struct LiquidateMsg {
64 pub position_holder: Addr,
65}
66
67#[cw_serde]
68pub struct ConfigUpdate {
69 pub owner: Option<Addr>,
70 pub orca_addr: Option<Addr>,
71 pub collateral_oracle_denom: Option<String>,
72 pub collateral_decimals: Option<u8>,
73 pub max_ltv: Option<Decimal>,
74 pub full_liquidation_threshold: Option<Uint128>,
75 pub partial_liquidation_target: Option<Decimal>,
76 pub borrow_fee: Option<Decimal>,
77}