okx-liquidation-guard

Monitors DeFi borrow positions and auto-repays debt when health factor approaches liquidation.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-liquidation-guard-nith567
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: okx-liquidation-guard
Source: https://github.com/Nith567/xlayer-skills-arena/tree/main/okx-liquidation-guard
Command: npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-liquidation-guard-nith567

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? DeFi borrowers on Aave, Compound, Morpho, and similar protocols risk losing collateral to liquidation penalties when market prices drop. This Skill continuously monitors health factors and automatically repays debt before liquidation occurs, removing the need for manual position watching. ## Core Features & Use Cases - Health Factor Monitoring: Scans borrow positions via onchainos defi positions, calculates health factor from collateral value and liquidation thresholds, and classifies risk from safe to critical. - Automated Repayment: When health factor drops below 1.2, calculates the exact repayment amount to restore a 1.5 target and executes repayment via onchainos defi invest, swapping tokens first if stablecoin balance is insufficient. - Scheduled Protection: Uses CronCreate to run hourly checks across X Layer, Base, Ethereum, and Arbitrum, with configurable warning, auto-repay, and emergency thresholds. - Use Case: A user with a WBTC-collateralized USDC loan on Aave V3 Base asks "protect my Aave position" — the Skill detects HF 1.20, repays $560 USDC to restore HF 1.52, and keeps monitoring hourly. ## Quick Start Ask the agent to protect your Aave borrow position and set up hourly liquidation monitoring with auto-repay enabled.

Frequently Asked Questions about okx-liquidation-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I protect my Aave position from liquidation?▼

The Skill scans your borrow positions via onchainos defi positions, calculates health factor from collateral value and liquidation threshold, then sets up hourly CronCreate monitoring. When health factor drops below 1.2, it auto-repays enough debt to restore a 1.5 target level.

How is DeFi health factor calculated for Aave and Compound?▼

Health factor equals collateral value in USD multiplied by the protocol liquidation threshold, divided by debt value in USD. Aave V3 uses 0.825 for ETH, 0.875 for USDC, and 0.80 for WBTC collateral; Compound V3 uses 0.80.

Which chains and protocols does liquidation monitoring support?▼

Monitoring works on X Layer (Aave V3 with USDG), Base, Ethereum, and Arbitrum. Supported lending protocols include Aave V3, Compound V3, Morpho, Spark, and Venus, detected through onchainos defi positions output.

What happens if my wallet has no stablecoins to repay the loan?▼

The Skill first checks wallet balance via onchainos wallet balance. If stablecoins are insufficient, it swaps other tokens to USDC using onchainos swap execute before repaying; if repayment is impossible, it sends an urgent notification for manual action.

At what price will my collateral get liquidated?▼

Ask for a liquidation price analysis and the Skill computes the exact collateral price where health factor reaches 1.0, using your debt value and the protocol liquidation threshold. It also shows warning and critical price levels with percentage distance from the current price.