SentinelFi is an Autonomous Liquidation Protection layer for DeFi, powered by the Reactive Network. It monitors borrowing health on Ethereum Sepolia and triggers on-chain callbacks to a destination contract to protect collateral—completely without off-chain keepers, bots, or centralized infrastructure.
- Autonomous Protection: Real-time monitoring and execution via Reactive Smart Contracts (RSC).
- Multi-Asset Support: Track aggregate collateral across multiple assets (ETH, WBTC, USDC).
- User-Defined Thresholds: Users configure their own "Warning" and "Emergency" levels directly on-chain.
- Cross-Chain Reactive Loop: Origin events on Sepolia → Processing on Lasna → Callback execution on Sepolia.
┌────────────────────────────── Sepolia (11155111) ──────────────────────────────┐
│ │
│ ┌───────────────┐ HealthFactorUpdated event │
│ │ LendingPool │ ────────────────────────────────────────────────┐ │
│ │ (Origin mock) │ │ │
│ └───────────────┘ │ │
│ ▲ │ │
│ │ updateHealthFactor / openPosition │ │
│ │ v │
│ ┌────────────────────┐ Callback tx via Callback Proxy ┌──────────────────┐ │
│ │ CollateralManager │ <───────────────────────────────── │ Reactive flow │ │
│ │ (Destination) │ handleProtection(...) │ (Lasna RSC) │ │
│ └────────────────────┘ └────────▲────────┘ │
│ │ │
└─────────────────────────────────────────────────────────────────────────┼──────────┘
│
┌──────────────────────────────┴───────────┐
│ Lasna Reactive testnet (5318007) │
│ │
│ ┌──────────────────────┐ │
│ │ LiquidationGuard │ │
│ │ (RSC / AbstractReactive) │
│ │ react(LogRecord) │ │
│ └──────────────────────┘ │
└────────────────────────────────────────────┘
sentinelfi/
├── contracts/
│ ├── LendingPool.sol # Mock lending position manager
│ ├── LiquidationGuard.sol # Reactive RSC on Lasna
│ ├── CollateralManager.sol # Protection callback destination
│ └── reactive-lib/src/... # Reactive Network interfaces
├── scripts/
│ ├── deploy-lending-pool.js
│ ├── deploy-collateral-manager.js
│ ├── deploy-liquidation-guard.js
│ └── simulate.js
├── frontend/ # Modern React + RainbowKit UI
└── README.md
- Node.js 18+
- A wallet funded on Sepolia and Lasna (lREACT for gas)
- RPC URLs for both networks
-
Install Dependencies:
npm install cd frontend && npm install
-
Configure Environment: Create a
.envin the root andfrontend/directories (see.env.example). -
Deploy & Run:
# Deploy core system npx hardhat run scripts/deploy-lending-pool.js --network sepolia npx hardhat run scripts/deploy-collateral-manager.js --network sepolia npx hardhat run scripts/deploy-liquidation-guard.js --network lasna # Start Frontend cd frontend && npm run dev
- Launch App: Open the frontend and connect your wallet via RainbowKit.
- Set Thresholds: Input your custom "Warning" and "Emergency" Health Factors (e.g., 1.3 and 1.2).
- Open Position: Click "Open Multi-Asset Position" to create a diversified mock loan.
- Simulate Stress: Click "Simulate Market Stress". This will lower your Health Factor on-chain.
- Watch the Magic:
- The Reactive RSC on Lasna will detect the drop.
- It will trigger a verified callback to Sepolia.
- You will see Toast Notifications and a new entry in the Protection History automatically.
| Network | Contract | Address |
|---|---|---|
| Sepolia | LendingPool |
0x1e437A0154892Fc9f6fA28125FDEB5a0B0ed44dc |
| Sepolia | CollateralManager |
0x4b65B2C065e2995EB4f9Ee11749df0b40f429DbA |
| Lasna | LiquidationGuard |
0xe94cE5D39017437B68fa9b5B694a51Dfb641abc6 |
MIT (Demo Code for Prize Grant Application).