Skip to Content

Ajna Protocol

Ajna is a permissionless, oracle-free lending protocol. This plugin provides actions for liquidation keeper operations (kick, bucket-take, settle, withdraw bonds) and vault keeper operations (drain, move liquidity, buffer management) across two lending pools on Base: cbBTC/usBTCd and usBTCd/webmx.

All read actions work without credentials. Write actions require a connected wallet.

Supported chains: Base (8453) only.

Actions

ActionTypeCredentialsDescription
Get Auction StatusReadNoGet current auction status for a borrower in an Ajna pool
Get HPB IndexReadNoGet the highest price bucket index of an Ajna pool
Get Pool LUPReadNoGet the Lowest Utilized Price of an Ajna pool
Get Pool HTPReadNoGet the Highest Threshold Price of an Ajna pool
Get Borrower InfoReadNoGet borrower loan information including debt, collateral, and threshold price
Price to Bucket IndexReadNoConvert a price to its corresponding Ajna bucket index
Bucket Index to PriceReadNoConvert a bucket index to its corresponding price
Get Deposit IndexReadNoGet the bucket index containing a given amount of deposit for an Ajna pool
Pool 1 Kicker InfoReadNoGet kicker bond information in the cbBTC/usBTCd pool
Pool 1 Auction InfoReadNoGet auction details for a borrower in the cbBTC/usBTCd pool
Pool 1 Bucket InfoReadNoGet bucket information at a given index in the cbBTC/usBTCd pool
Pool 1 Inflator InfoReadNoGet pool inflator and last update timestamp for cbBTC/usBTCd pool
Pool 1 KickWriteWalletKick an undercollateralized borrower to start a liquidation auction in the cbBTC/usBTCd pool
Pool 1 Bucket TakeWriteWalletTake from a liquidation auction using bucket liquidity in the cbBTC/usBTCd pool
Pool 1 SettleWriteWalletSettle a completed liquidation auction in the cbBTC/usBTCd pool
Pool 1 Withdraw BondsWriteWalletWithdraw claimable kicker bonds from the cbBTC/usBTCd pool
Pool 1 Update InterestWriteWalletUpdate interest rate for the cbBTC/usBTCd pool
Pool 2 Kicker InfoReadNoGet kicker bond information in the usBTCd/webmx pool
Pool 2 Auction InfoReadNoGet auction details for a borrower in the usBTCd/webmx pool
Pool 2 Bucket InfoReadNoGet bucket information at a given index in the usBTCd/webmx pool
Pool 2 Inflator InfoReadNoGet pool inflator and last update timestamp for usBTCd/webmx pool
Pool 2 KickWriteWalletKick an undercollateralized borrower to start a liquidation auction in the usBTCd/webmx pool
Pool 2 Bucket TakeWriteWalletTake from a liquidation auction using bucket liquidity in the usBTCd/webmx pool
Pool 2 SettleWriteWalletSettle a completed liquidation auction in the usBTCd/webmx pool
Pool 2 Withdraw BondsWriteWalletWithdraw claimable kicker bonds from the usBTCd/webmx pool
Pool 2 Update InterestWriteWalletUpdate interest rate for the usBTCd/webmx pool
Vault 1 Is PausedReadNoCheck if the cbBTC/usBTCd vault is paused
Vault 1 Get BucketsReadNoGet all active bucket indices in the cbBTC/usBTCd vault
Vault 1 Total AssetsReadNoGet total assets managed by the cbBTC/usBTCd vault
Vault 1 LP to ValueReadNoConvert LP amount to quote token value for a bucket in the cbBTC/usBTCd vault
Vault 1 Drain BucketWriteWalletDrain all liquidity from a bucket in the cbBTC/usBTCd vault
Vault 1 Move LiquidityWriteWalletMove liquidity between buckets in the cbBTC/usBTCd vault
Vault 1 Move From BufferWriteWalletMove liquidity from the buffer to a pool bucket in the cbBTC/usBTCd vault
Vault 1 Move To BufferWriteWalletMove liquidity from a pool bucket to the buffer in the cbBTC/usBTCd vault
Vault 2 Is PausedReadNoCheck if the usBTCd/webmx vault is paused
Vault 2 Get BucketsReadNoGet all active bucket indices in the usBTCd/webmx vault
Vault 2 Total AssetsReadNoGet total assets managed by the usBTCd/webmx vault
Vault 2 LP to ValueReadNoConvert LP amount to quote token value for a bucket in the usBTCd/webmx vault
Vault 2 Drain BucketWriteWalletDrain all liquidity from a bucket in the usBTCd/webmx vault
Vault 2 Move LiquidityWriteWalletMove liquidity between buckets in the usBTCd/webmx vault
Vault 2 Move From BufferWriteWalletMove liquidity from the buffer to a pool bucket in the usBTCd/webmx vault
Vault 2 Move To BufferWriteWalletMove liquidity from a pool bucket to the buffer in the usBTCd/webmx vault
Vault 1 Buffer RatioReadNoGet the target buffer ratio for the cbBTC/usBTCd vault
Vault 1 Min Bucket IndexReadNoGet the minimum allowed bucket index for the cbBTC/usBTCd vault
Vault 2 Buffer RatioReadNoGet the target buffer ratio for the usBTCd/webmx vault
Vault 2 Min Bucket IndexReadNoGet the minimum allowed bucket index for the usBTCd/webmx vault
Vault 1 Buffer TotalReadNoGet total liquidity held in the cbBTC/usBTCd buffer contract
Vault 2 Buffer TotalReadNoGet total liquidity held in the usBTCd/webmx buffer contract

Get Auction Status

Get the current auction state for a borrower across any Ajna pool. Returns kick time, collateral, debt to cover, price, neutral price, and bond factor.

Inputs:

InputTypeDescription
ajnaPool_addressPool Address
borrower_addressBorrower Address

Outputs:

OutputTypeDescription
kickTime_uint256Kick Timestamp
collateral_uint256Collateral (WAD), 18 decimals
debtToCover_uint256Debt to Cover (WAD), 18 decimals
isCollateralized_boolIs Collateralized
price_uint256Current Price (WAD), 18 decimals
neutralPrice_uint256Neutral Price (WAD), 18 decimals
referencePrice_uint256Reference Price (WAD), 18 decimals
debtToCollateral_uint256Debt to Collateral (WAD), 18 decimals
bondFactor_uint256Bond Factor (WAD), 18 decimals

When to use: Check whether an auction is active and what price it is currently at before deciding to take. Use in combination with Pool Kick and Pool Bucket Take to build a complete liquidation keeper workflow.


Get HPB Index

Get the highest price bucket index currently active in an Ajna pool.

Inputs:

InputTypeDescription
ajnaPool_addressPool Address

Outputs:

OutputTypeDescription
indexuint256HPB Index

When to use: Determine where the highest-priced liquidity sits. Useful as an input to bucket take operations and for monitoring pool health.


Get Pool LUP

Get the Lowest Utilized Price of an Ajna pool.

Inputs:

InputTypeDescription
ajnaPool_addressPool Address

Outputs:

OutputTypeDescription
lupuint256LUP (WAD), 18 decimals

When to use: Monitor the pool’s liquidity utilization level. The LUP determines whether borrowers are collateralized and eligible for kicking.


Get Pool HTP

Get the Highest Threshold Price of an Ajna pool.

Inputs:

InputTypeDescription
ajnaPool_addressPool Address

Outputs:

OutputTypeDescription
htpuint256HTP (WAD), 18 decimals

When to use: Monitor the pool’s highest threshold price to identify borrowers near liquidation. Compare against LUP to assess overall pool risk.


Get Borrower Info

Get complete loan information for a specific borrower in an Ajna pool.

Inputs:

InputTypeDescription
ajnaPool_addressPool Address
borrower_addressBorrower Address

Outputs:

OutputTypeDescription
debtuint256Borrower Debt (WAD), 18 decimals
collateraluint256Borrower Collateral (WAD), 18 decimals
t0Npuint256T0 Neutral Price (WAD), 18 decimals
thresholdPriceuint256Threshold Price (WAD), 18 decimals
neutralPriceuint256Neutral Price (WAD), 18 decimals

When to use: Inspect a specific borrower’s position before deciding to kick them. Compare threshold price against LUP to confirm they are eligible for liquidation.


Price to Bucket Index

Convert a WAD-denominated price to the corresponding Ajna bucket index.

Inputs:

InputTypeDescription
priceuint256Price (WAD)

Outputs:

OutputTypeDescription
indexuint256Bucket Index

When to use: Translate a price value into a bucket index when configuring vault operations or targeting a specific price range for bucket take.


Bucket Index to Price

Convert an Ajna bucket index to its corresponding WAD-denominated price.

Inputs:

InputTypeDescription
index_uint256Bucket Index

Outputs:

OutputTypeDescription
priceuint256Price (WAD), 18 decimals

When to use: Look up the price represented by a given bucket index. Useful for display and for verifying bucket positions in vault workflows.


Get Deposit Index

Get the bucket index that contains a given amount of deposit for an Ajna pool.

Inputs:

InputTypeDescription
ajnaPool_addressPool Address
debt_uint256Debt Amount (WAD)

Outputs:

OutputTypeDescription
indexuint256Deposit Bucket Index

When to use: Find which bucket holds enough deposit to cover a given debt level. Used to select the correct limit index when kicking borrowers.


Pool 1 Kicker Info

Get the claimable and locked bond amounts for a kicker address in the cbBTC/usBTCd pool.

Inputs:

InputTypeDescription
kicker_addressKicker Address

Outputs:

OutputTypeDescription
claimableuint256Claimable Bond (WAD), 18 decimals
lockeduint256Locked Bond (WAD), 18 decimals

When to use: Check how much bond is available to withdraw after auctions complete. Use before calling Pool 1 Withdraw Bonds to confirm the claimable amount.


Pool 1 Auction Info

Get full auction details for a specific borrower in the cbBTC/usBTCd pool.

Inputs:

InputTypeDescription
borrower_addressBorrower Address

Outputs:

OutputTypeDescription
kickeraddressKicker Address
bondFactoruint256Bond Factor (WAD), 18 decimals
bondSizeuint256Bond Size (WAD), 18 decimals
kickTimeuint256Kick Timestamp
referencePriceuint256Reference Price (WAD), 18 decimals
neutralPriceuint256Neutral Price (WAD), 18 decimals
debtToCollateraluint256Debt to Collateral (WAD), 18 decimals
headaddressHead Address
nextaddressNext Address
prevaddressPrev Address

When to use: Verify auction state and timing before taking or settling. Check kick time to determine how long the auction has been running.


Pool 1 Bucket Info

Get information for a specific bucket by index in the cbBTC/usBTCd pool.

Inputs:

InputTypeDescription
index_uint256Bucket Index

Outputs:

OutputTypeDescription
priceuint256Bucket Price (WAD), 18 decimals
quoteTokensuint256Quote Tokens (WAD), 18 decimals
collateraluint256Collateral (WAD), 18 decimals
bucketLPuint256LP Amount (WAD), 18 decimals
scaleuint256Bucket Scale (WAD), 18 decimals

When to use: Inspect liquidity depth at a target bucket before executing a bucket take or move operation.


Pool 1 Inflator Info

Get the pool inflator and last update timestamp for the cbBTC/usBTCd pool.

Inputs: None

Outputs:

OutputTypeDescription
inflatoruint256Pool Inflator (WAD), 18 decimals
lastUpdateuint256Last Update Timestamp

When to use: Monitor how long since interest was last accrued. Use to decide when to call Pool 1 Update Interest.


Pool 1 Kick

Kick an undercollateralized borrower to initiate a liquidation auction in the cbBTC/usBTCd pool. The caller provides a bond and earns rewards if the auction clears at or above the neutral price.

Inputs:

InputTypeDescription
borrower_addressBorrower Address
limitIndex_uint256Limit Bucket Index

Outputs: success, transactionHash, transactionLink, error

When to use: Start a liquidation when a borrower’s threshold price exceeds the LUP. Precede with Get Borrower Info and Get Pool LUP to confirm eligibility.


Pool 1 Bucket Take

Take collateral from an active liquidation auction using bucket liquidity in the cbBTC/usBTCd pool. LP holders in the target bucket receive collateral in exchange for their quote tokens.

Inputs:

InputTypeDescription
borrowerAddress_addressBorrower Address
depositTake_boolUse Deposit Take
index_uint256Bucket Index

Outputs: success, transactionHash, transactionLink, error

When to use: Execute a liquidation take using existing bucket liquidity. Call after confirming an active auction via Pool 1 Auction Info or Get Auction Status.


Pool 1 Settle

Settle a completed liquidation auction in the cbBTC/usBTCd pool, distributing remaining collateral and debt across buckets.

Inputs:

InputTypeDescription
borrowerAddress_addressBorrower Address
maxDepth_uint256Max Bucket Depth

Outputs: success, transactionHash, transactionLink, error

When to use: Finalize an auction after the auction period has ended or all debt has been covered. Settle unlocks bonded kicker funds.


Pool 1 Withdraw Bonds

Withdraw claimable kicker bond from the cbBTC/usBTCd pool to a recipient address.

Inputs:

InputTypeDescription
recipient_addressRecipient Address
maxAmount_uint256Max Amount (WAD)

Outputs: success, transactionHash, transactionLink, error

When to use: Reclaim kicker rewards after successful liquidations. Call Pool 1 Kicker Info first to confirm the claimable balance.


Pool 1 Update Interest

Accrue and update the interest rate for the cbBTC/usBTCd pool.

Inputs: None

Outputs: success, transactionHash, transactionLink, error

When to use: Keep pool interest up to date. Call periodically or before executing pool operations to ensure accurate debt accounting.


Pool 2 Kicker Info

Get the claimable and locked bond amounts for a kicker address in the usBTCd/webmx pool.

Inputs:

InputTypeDescription
kicker_addressKicker Address

Outputs:

OutputTypeDescription
claimableuint256Claimable Bond (WAD), 18 decimals
lockeduint256Locked Bond (WAD), 18 decimals

When to use: Check how much bond is available to withdraw after auctions complete in Pool 2. Use before calling Pool 2 Withdraw Bonds.


Pool 2 Auction Info

Get full auction details for a specific borrower in the usBTCd/webmx pool.

Inputs:

InputTypeDescription
borrower_addressBorrower Address

Outputs:

OutputTypeDescription
kickeraddressKicker Address
bondFactoruint256Bond Factor (WAD), 18 decimals
bondSizeuint256Bond Size (WAD), 18 decimals
kickTimeuint256Kick Timestamp
referencePriceuint256Reference Price (WAD), 18 decimals
neutralPriceuint256Neutral Price (WAD), 18 decimals
debtToCollateraluint256Debt to Collateral (WAD), 18 decimals
headaddressHead Address
nextaddressNext Address
prevaddressPrev Address

When to use: Verify auction state for Pool 2 before taking or settling. Check kick time to determine elapsed auction duration.


Pool 2 Bucket Info

Get information for a specific bucket by index in the usBTCd/webmx pool.

Inputs:

InputTypeDescription
index_uint256Bucket Index

Outputs:

OutputTypeDescription
priceuint256Bucket Price (WAD), 18 decimals
quoteTokensuint256Quote Tokens (WAD), 18 decimals
collateraluint256Collateral (WAD), 18 decimals
bucketLPuint256LP Amount (WAD), 18 decimals
scaleuint256Bucket Scale (WAD), 18 decimals

When to use: Inspect liquidity at a target bucket in Pool 2 before bucket take or liquidity movement operations.


Pool 2 Inflator Info

Get the pool inflator and last update timestamp for the usBTCd/webmx pool.

Inputs: None

Outputs:

OutputTypeDescription
inflatoruint256Pool Inflator (WAD), 18 decimals
lastUpdateuint256Last Update Timestamp

When to use: Monitor interest accrual staleness for Pool 2. Use to decide when to call Pool 2 Update Interest.


Pool 2 Kick

Kick an undercollateralized borrower to initiate a liquidation auction in the usBTCd/webmx pool.

Inputs:

InputTypeDescription
borrower_addressBorrower Address
limitIndex_uint256Limit Bucket Index

Outputs: success, transactionHash, transactionLink, error

When to use: Start a liquidation in Pool 2 when a borrower’s threshold price exceeds the LUP.


Pool 2 Bucket Take

Take collateral from an active liquidation auction using bucket liquidity in the usBTCd/webmx pool.

Inputs:

InputTypeDescription
borrowerAddress_addressBorrower Address
depositTake_boolUse Deposit Take
index_uint256Bucket Index

Outputs: success, transactionHash, transactionLink, error

When to use: Execute a liquidation take in Pool 2 using existing bucket liquidity.


Pool 2 Settle

Settle a completed liquidation auction in the usBTCd/webmx pool.

Inputs:

InputTypeDescription
borrowerAddress_addressBorrower Address
maxDepth_uint256Max Bucket Depth

Outputs: success, transactionHash, transactionLink, error

When to use: Finalize an auction in Pool 2 after the auction period ends or all debt is covered.


Pool 2 Withdraw Bonds

Withdraw claimable kicker bond from the usBTCd/webmx pool.

Inputs:

InputTypeDescription
recipient_addressRecipient Address
maxAmount_uint256Max Amount (WAD)

Outputs: success, transactionHash, transactionLink, error

When to use: Reclaim kicker rewards from Pool 2 after successful liquidations.


Pool 2 Update Interest

Accrue and update the interest rate for the usBTCd/webmx pool.

Inputs: None

Outputs: success, transactionHash, transactionLink, error

When to use: Keep Pool 2 interest up to date. Call periodically or before pool operations.


Vault 1 Is Paused

Check whether the cbBTC/usBTCd vault is currently paused.

Inputs: None

Outputs:

OutputTypeDescription
isPausedboolIs Vault Paused

When to use: Gate vault operations on pause state. If the vault is paused, skip drain, move, and buffer operations to avoid reverts.


Vault 1 Get Buckets

Get all active bucket indices currently held in the cbBTC/usBTCd vault.

Inputs: None

Outputs:

OutputTypeDescription
bucketsuint256[]Active Bucket Indices

When to use: Enumerate all buckets the vault holds positions in. Use as input to LP-to-value or drain operations when iterating over all positions.


Vault 1 Total Assets

Get the total quote token assets managed by the cbBTC/usBTCd vault.

Inputs: None

Outputs:

OutputTypeDescription
assetsuint256Total Assets (WAD), 18 decimals

When to use: Monitor the vault’s total value. Use in rebalancing workflows to compare against buffer total and calculate target allocations.


Vault 1 LP to Value

Convert an LP amount to its quote token value for a specific bucket in the cbBTC/usBTCd vault.

Inputs:

InputTypeDescription
bucketuint256Bucket Index

Outputs:

OutputTypeDescription
valueuint256Value (WAD), 18 decimals

When to use: Calculate the current quote token value of a bucket position before moving or draining it.


Vault 1 Drain Bucket

Drain all liquidity from a specific bucket in the cbBTC/usBTCd vault, withdrawing all quote tokens and collateral.

Inputs:

InputTypeDescription
bucketuint256Bucket Index

Outputs: success, transactionHash, transactionLink, error

When to use: Remove liquidity from an out-of-range or empty bucket to consolidate vault positions.


Vault 1 Move Liquidity

Move liquidity from one bucket to another within the cbBTC/usBTCd vault.

Inputs:

InputTypeDescription
fromIndex_uint256Source Bucket Index
toIndex_uint256Destination Bucket Index
amt_uint256Amount (WAD)

Outputs: success, transactionHash, transactionLink, error

When to use: Rebalance vault liquidity between price buckets. Use when the LUP shifts and optimal bucket range changes.


Vault 1 Move From Buffer

Move liquidity from the buffer contract into a pool bucket in the cbBTC/usBTCd vault.

Inputs:

InputTypeDescription
toIndex_uint256Destination Bucket Index
amt_uint256Amount (WAD)

Outputs: success, transactionHash, transactionLink, error

When to use: Deploy buffered capital into the pool when the buffer ratio exceeds the target. Use Vault 1 Buffer Total and Vault 1 Buffer Ratio to determine the amount to deploy.


Vault 1 Move To Buffer

Move liquidity from a pool bucket into the buffer in the cbBTC/usBTCd vault.

Inputs:

InputTypeDescription
fromIndex_uint256Source Bucket Index
amt_uint256Amount (WAD)

Outputs: success, transactionHash, transactionLink, error

When to use: Pull liquidity from the pool into the buffer when the buffer ratio falls below the target. Provides dry powder for deposit redemptions.


Vault 2 Is Paused

Check whether the usBTCd/webmx vault is currently paused.

Inputs: None

Outputs:

OutputTypeDescription
isPausedboolIs Vault Paused

When to use: Gate vault operations on pause state for Vault 2.


Vault 2 Get Buckets

Get all active bucket indices currently held in the usBTCd/webmx vault.

Inputs: None

Outputs:

OutputTypeDescription
bucketsuint256[]Active Bucket Indices

When to use: Enumerate all active positions in Vault 2 for iteration and value calculations.


Vault 2 Total Assets

Get the total quote token assets managed by the usBTCd/webmx vault.

Inputs: None

Outputs:

OutputTypeDescription
assetsuint256Total Assets (WAD), 18 decimals

When to use: Monitor the total value of Vault 2. Use in rebalancing comparisons against buffer total.


Vault 2 LP to Value

Convert an LP amount to its quote token value for a specific bucket in the usBTCd/webmx vault.

Inputs:

InputTypeDescription
bucketuint256Bucket Index

Outputs:

OutputTypeDescription
valueuint256Value (WAD), 18 decimals

When to use: Calculate the current quote token value of a Vault 2 bucket position.


Vault 2 Drain Bucket

Drain all liquidity from a specific bucket in the usBTCd/webmx vault.

Inputs:

InputTypeDescription
bucketuint256Bucket Index

Outputs: success, transactionHash, transactionLink, error

When to use: Remove liquidity from an out-of-range bucket in Vault 2.


Vault 2 Move Liquidity

Move liquidity from one bucket to another within the usBTCd/webmx vault.

Inputs:

InputTypeDescription
fromIndex_uint256Source Bucket Index
toIndex_uint256Destination Bucket Index
amt_uint256Amount (WAD)

Outputs: success, transactionHash, transactionLink, error

When to use: Rebalance Vault 2 liquidity when the pool’s price range shifts.


Vault 2 Move From Buffer

Move liquidity from the buffer into a pool bucket in the usBTCd/webmx vault.

Inputs:

InputTypeDescription
toIndex_uint256Destination Bucket Index
amt_uint256Amount (WAD)

Outputs: success, transactionHash, transactionLink, error

When to use: Deploy buffered capital in Vault 2 when buffer ratio is above target.


Vault 2 Move To Buffer

Move liquidity from a pool bucket into the buffer in the usBTCd/webmx vault.

Inputs:

InputTypeDescription
fromIndex_uint256Source Bucket Index
amt_uint256Amount (WAD)

Outputs: success, transactionHash, transactionLink, error

When to use: Pull liquidity from Vault 2 into the buffer when buffer ratio falls below target.


Vault 1 Buffer Ratio

Get the target buffer ratio configured for the cbBTC/usBTCd vault.

Inputs: None

Outputs:

OutputTypeDescription
ratiouint256Buffer Ratio (WAD), 18 decimals

When to use: Read the target ratio before deciding whether to call Move From Buffer or Move To Buffer. Compare against current buffer total divided by total assets.


Vault 1 Min Bucket Index

Get the minimum allowed bucket index for the cbBTC/usBTCd vault.

Inputs: None

Outputs:

OutputTypeDescription
indexuint256Min Bucket Index

When to use: Validate target bucket indices before move operations to ensure they are within the allowed range.


Vault 2 Buffer Ratio

Get the target buffer ratio configured for the usBTCd/webmx vault.

Inputs: None

Outputs:

OutputTypeDescription
ratiouint256Buffer Ratio (WAD), 18 decimals

When to use: Read the target ratio for Vault 2 before buffer rebalancing decisions.


Vault 2 Min Bucket Index

Get the minimum allowed bucket index for the usBTCd/webmx vault.

Inputs: None

Outputs:

OutputTypeDescription
indexuint256Min Bucket Index

When to use: Validate target bucket indices for Vault 2 move operations.


Vault 1 Buffer Total

Get the total liquidity held in the cbBTC/usBTCd buffer contract.

Inputs: None

Outputs:

OutputTypeDescription
bufferTotaluint256Buffer Total (WAD), 18 decimals

When to use: Read current buffer balance before rebalancing. Divide by Vault 1 Total Assets to compute the current buffer ratio and compare against the target.


Vault 2 Buffer Total

Get the total liquidity held in the usBTCd/webmx buffer contract.

Inputs: None

Outputs:

OutputTypeDescription
bufferTotaluint256Buffer Total (WAD), 18 decimals

When to use: Read the current buffer balance for Vault 2 before deciding on buffer rebalancing operations.


Example Workflows

Automated Liquidation Keeper (Pool 1)

Schedule (every 5 min) -> Ajna: Get Borrower Info -> Ajna: Get Pool LUP -> Condition (thresholdPrice > lup) -> Ajna: Pool 1 Kick

Periodically check a borrower’s threshold price against the pool’s LUP. If the borrower is undercollateralized, kick them to start the liquidation auction.

Liquidation Settle and Bond Withdrawal

Webhook (auction ended) -> Ajna: Pool 1 Auction Info -> Ajna: Pool 1 Settle -> Ajna: Pool 1 Kicker Info -> Condition (claimable > 0) -> Ajna: Pool 1 Withdraw Bonds -> Discord: Send Message

On auction completion webhook, settle the auction, check for claimable bond, withdraw it, and send a Discord notification with the transaction link.

Vault Buffer Rebalancing (Vault 1)

Schedule (hourly) -> Ajna: Vault 1 Total Assets -> Ajna: Vault 1 Buffer Total -> Ajna: Vault 1 Buffer Ratio -> Condition (bufferTotal / totalAssets < ratio) -> Ajna: Vault 1 Move To Buffer

Hourly check whether the buffer has fallen below its target ratio and automatically move liquidity from a pool bucket into the buffer to restore the target.

Vault Pause Guard

Schedule (every 1 min) -> Ajna: Vault 1 Is Paused -> Condition (isPaused == false) -> Ajna: Vault 1 Get Buckets -> Ajna: Vault 1 LP to Value -> Ajna: Vault 1 Move Liquidity

Check vault pause state before running any rebalancing operations. If the vault is paused, the condition gate stops the workflow without executing writes.


Supported Chains

ChainContracts Available
Base (8453)Pool Info Utils, cbBTC/usBTCd Pool, usBTCd/webmx Pool, cbBTC/usBTCd Vault, usBTCd/webmx Vault, Vault Config (x2), Buffer (x2)

All contracts are deployed on Base only. Cross-chain operation is not supported.