Peridottroller
SimplePeridottroller is the protocol’s risk engine. It aggregates collateral and debt across markets, enforces borrow and redeem checks, and coordinates liquidations and rewards.
Responsibilities
Compute account liquidity and shortfall in USD terms.
Enforce collateral factors and market caps.
Gate borrows and redeems for all markets.
Manage liquidations and seize flows.
Accrue and mint
PeridotTokenrewards.
Key Functions
add_market(market)Register a newReceiptVaultmarket.enter_market(user, market)Adds a market to the user's collateral set.account_liquidity(user) -> (liquidity, shortfall)Returns USD liquidity/shortfall for the user.hypothetical_liquidity(user, market, redeem_tokens, borrow_amount)Dry-run to check post-action liquidity.hypothetical_liquidity_with_hint(user, market, redeem_tokens, borrow_amount, hint)Same as above, with same-market collateral hint to avoid re-entry.liquidate(borrower, liquidator, repay_market, seize_market, repay_amount)Core liquidation entrypoint.get_price_usd(token)Oracle price in USD (scaled).claim(user)Mint accruedPeridotTokenrewards.
Events
MarketAddedMarketRemovedLiquidationPeridotTokenSetRewardsClaimed
Last updated