Orderbook
Overview
The Orderbook contains modified order-book functionality, matching lenders to borrower within the BloomPool .
Contract API
openDepth
openDepthfunction openDepth(uint256 amount) external;Returns the current total depth of open orders in terms of asset tokens.
amountOpen
amountOpenfunction amountOpen(address account) external view returns (uint256);Returns the total amount of underlying assets in open orders for a users account.
lendOrder
lendOrderfunction lendOrder(uint256 amount) external;Opens a lend order for a user.
Assets will be transferred to the BloomPool contract when executing this function, but no receipt token will be given. TBYs are only minted after orders have been matched and market makers have performed their swaps.
killOpenOrder
killOpenOrderAllows users to cancel their open lend order and withdraw their underlying assets.
matchedDepth
matchedDepthReturns the current total depth of matched orders.
amountMatched
amountMatchedReturns the total amount of underlying assets in matched orders for a users account.
matchedOrder
matchedOrderReturns the matched order details for a users account in the form of a MatchOrder struct.
matchedOrderCount
matchedOrderCountReturns the number of matched orders for a users account.
killMatchOrder
killMatchOrderAllows users to cancel their match lend orders and withdraw their underlying assets.
Returns the totalRemoved amount in terms of asset tokens.
killBorrowerMatch
killBorrowerMatchAllows borrowers to cancel their match orders and withdraw their underlying assets
Returns the lenderAmount and borrowerReturn in terms of underlying assets that were returned to the various users.
fillOrder
fillOrderAllows borrowers to fill a single accounts lend order with a specified amount of underlying assets.
Returns the amount of liquidity filled in terms of asset tokens.
fillOrders
fillOrdersAllows borrowers to fill a multiple accounts lend orders with a specified amount of underlying assets.
Returns the amount of liquidity filled in terms of asset tokens.
idleCapital
idleCapitalReturns the idle capital of the borrower.
withdrawIdleCapital
withdrawIdleCapitalAllows borrowers to withdraw idle capital from the system.
Last updated
