fn pool(env: soroban_sdk::Env, pool_id: u64) -> Result
fn pause(env: soroban_sdk::Env, paused: bool) -> Result<(), DikeError>
fn buy_no(
env: soroban_sdk::Env,
trader: soroban_sdk::Address,
pool_id: u64,
amount_in: i128,
min_out: i128,
deadline: u64,
) -> Result
fn buy_yes(
env: soroban_sdk::Env,
trader: soroban_sdk::Address,
pool_id: u64,
amount_in: i128,
min_out: i128,
deadline: u64,
) -> Result
fn sell_no(
env: soroban_sdk::Env,
trader: soroban_sdk::Address,
pool_id: u64,
amount_in: i128,
min_out: i128,
deadline: u64,
) -> Result
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), DikeError>
fn sell_yes(
env: soroban_sdk::Env,
trader: soroban_sdk::Address,
pool_id: u64,
amount_in: i128,
min_out: i128,
deadline: u64,
) -> Result
fn set_role(
env: soroban_sdk::Env,
role: soroban_sdk::Symbol,
module: soroban_sdk::Address,
) -> Result<(), DikeError>
fn set_admin(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), DikeError>
fn lp_balance(env: soroban_sdk::Env, pool_id: u64, owner: soroban_sdk::Address) -> i128
fn create_pool(
env: soroban_sdk::Env,
market_id: u64,
fee_config: FeeConfig,
) -> Result
fn set_modules(
env: soroban_sdk::Env,
vault: soroban_sdk::Address,
tokens: soroban_sdk::Address,
collateral: soroban_sdk::Address,
registry: soroban_sdk::Address,
) -> Result<(), DikeError>
fn buy_child_no(
env: soroban_sdk::Env,
trader: soroban_sdk::Address,
parent_market_id: u64,
parent_outcome: Outcome,
pool_id: u64,
amount_in: i128,
min_out: i128,
deadline: u64,
) -> Result
fn quote_buy_no(
env: soroban_sdk::Env,
pool_id: u64,
amount_in: i128,
) -> Result
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
fn add_liquidity(
env: soroban_sdk::Env,
lp: soroban_sdk::Address,
pool_id: u64,
amount: i128,
) -> Result
fn buy_child_yes(
env: soroban_sdk::Env,
trader: soroban_sdk::Address,
parent_market_id: u64,
parent_outcome: Outcome,
pool_id: u64,
amount_in: i128,
min_out: i128,
deadline: u64,
) -> Result
fn claim_lp_fees(
env: soroban_sdk::Env,
lp: soroban_sdk::Address,
pool_id: u64,
) -> Result
fn quote_buy_yes(
env: soroban_sdk::Env,
pool_id: u64,
amount_in: i128,
) -> Result
fn quote_sell_no(
env: soroban_sdk::Env,
pool_id: u64,
amount_in: i128,
) -> Result
fn quote_sell_yes(
env: soroban_sdk::Env,
pool_id: u64,
amount_in: i128,
) -> Result
fn seed_liquidity(
env: soroban_sdk::Env,
lp: soroban_sdk::Address,
pool_id: u64,
amount: i128,
) -> Result
fn remove_liquidity(
env: soroban_sdk::Env,
lp: soroban_sdk::Address,
pool_id: u64,
shares: i128,
) -> Result<(i128, i128), DikeError>
fn claimable_lp_fees(
env: soroban_sdk::Env,
pool_id: u64,
owner: soroban_sdk::Address,
) -> Result
fn lp_fee_checkpoint(
env: soroban_sdk::Env,
pool_id: u64,
owner: soroban_sdk::Address,
) -> i128
Permissionless keeper entrypoint: force-closes user's entire parent-
outcome position once its real, mark-to-market sell value drops to
within 5% of the child debt it's backing (LIQUIDATION_THRESHOLD_BPS).
No role gate — the eligibility check below is the access control,
same as Aave/Compound-style liquidations. liquidator.require_auth()
only proves the caller wants to receive the bonus and pay the tx fee.
require_live (via force_sell, and checked again explicitly here to
fail fast) already blocks this while the parent market is anything
other than Live — Disputed/ResolutionRequested/CouncilVoting
included, since is_tradeable only returns true for Live. A
disputed outcome can still flip on appeal, so liquidating mid-dispute
could force-close a position that would've recovered.
fn liquidate_position(
env: soroban_sdk::Env,
liquidator: soroban_sdk::Address,
user: soroban_sdk::Address,
parent_pool_id: u64,
parent_outcome: Outcome,
) -> Result
Keeper follow-up for whatever child debt survived a parent
liquidation (or a child leg that's independently underwater relative
to its own debt) — same threshold/eligibility shape as
liquidate_position, targeting the child market's own pool directly.
fn liquidate_child_position(
env: soroban_sdk::Env,
liquidator: soroban_sdk::Address,
user: soroban_sdk::Address,
child_pool_id: u64,
child_outcome: Outcome,
) -> Result