How Nectar Works
Nectar is a multi-operator keeper infrastructure for Blend Protocol on Stellar. It replaces single-bot liquidation systems with a distributed network of competing keepers, funded by a shared vault.
Nectar Vault
Users deposit USDC into the NectarVault smart contract on Soroban. This pooled capital is available for keepers to draw from when profitable liquidation opportunities arise. Depositors receive LP shares and earn yield from successful liquidations.
Keeper Registry
Any operator can register as a keeper by calling the KeeperRegistry contract. Registered keepers independently monitor the Blend pool, detect liquidation opportunities, and compete to fill auctions. The admin can pause the registry in emergencies.
// Register as a keeper operator soroban contract invoke \ --id $REGISTRY_CONTRACT \ -- register \ --keeper $YOUR_ADDRESS \ --name "my-keeper"
Liquidation Engine
Keepers poll the Blend pool every few seconds for positions with health factor below 1.0. When found, they create an auction and evaluate profitability using the Dutch auction mechanics — collateral lot grows over 200 blocks while bid cost decreases. Keepers fill when the lot/bid ratio exceeds their threshold.
Multi-Operator Competition
Multiple keepers detect and attempt to fill the same auction simultaneously. The first confirmed transaction wins. Others gracefully handle the 'already filled' response. This ensures liquidations happen even if one operator goes offline — the core innovation over single-bot systems.
Real-time Dashboard
The frontend connects to the keeper API via Server-Sent Events (SSE) for real-time log streaming and polls REST endpoints for state updates. Monitor vault TVL, depositor positions, keeper stats, and liquidation history — all updating live.
- Connect your Stellar wallet (Freighter/Albedo/xBull)
- Navigate to Vault → Deposit
- Enter USDC amount and confirm transaction
- Monitor your PnL on the Performance page
- Withdraw anytime by redeeming shares
- Clone the repo and configure .env with your keypair
- Register on-chain: soroban contract invoke -- register
- Run the keeper binary: go run ./keeper
- Monitor via the dashboard or /metrics endpoint
- Compete for liquidation profits automatically
- Run scripts/testnet-setup.sh to provision wallets
- Deploy contracts with scripts/deploy.sh
- docker-compose up to launch keepers + frontend
- Seed vault with scripts/seed-vault.sh
- Monitor at localhost:3000