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.

01

Nectar Vault

Pooled Liquidation Capital

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.

Contract
NectarVault (Soroban/Rust)
Asset
USDC
Share Model
Pro-rata LP shares
Yield Source
10% profit from each liquidation
02

Keeper Registry

Decentralized Operator Network

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.

Contract
KeeperRegistry (Soroban/Rust)
Registration
Permissionless self-registration
Current Keepers
2 (alpha + beta)
Safety
Admin emergency pause
// Register as a keeper operator
soroban contract invoke \
  --id $REGISTRY_CONTRACT \
  -- register \
  --keeper $YOUR_ADDRESS \
  --name "my-keeper"
03

Liquidation Engine

Dutch Auction Monitoring & Execution

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.

Protocol
Blend Protocol Dutch Auctions
Duration
200 blocks (~16 minutes)
HF Threshold
< 1.0 triggers liquidation
Profit Model
Lot/bid ratio evaluation
Monitor positions (poll every 5s)
Detect HF < 1.0
Create auction on Blend pool
Evaluate lot/bid profitability
Draw capital from NectarVault
Fill auction (submit bid)
Return capital + profit to vault
04

Multi-Operator Competition

No Single Point of Failure

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.

Race Resolution
First-confirmed wins
Failure Handling
Graceful ErrAlreadyFilled
Capital Safety
Drawn USDC returned on loss
Redundancy
N operators, any 1 suffices
05

Real-time Dashboard

Live Keeper & Vault Monitoring

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.

Transport
SSE + REST polling
Metrics
Prometheus /metrics endpoint
Dashboard
Performance + live log stream
Max SSE Clients
100 concurrent
GETTING STARTED
As a Depositor
  1. Connect your Stellar wallet (Freighter/Albedo/xBull)
  2. Navigate to Vault → Deposit
  3. Enter USDC amount and confirm transaction
  4. Monitor your PnL on the Performance page
  5. Withdraw anytime by redeeming shares
As a Keeper Operator
  1. Clone the repo and configure .env with your keypair
  2. Register on-chain: soroban contract invoke -- register
  3. Run the keeper binary: go run ./keeper
  4. Monitor via the dashboard or /metrics endpoint
  5. Compete for liquidation profits automatically
Self-Host Everything
  1. Run scripts/testnet-setup.sh to provision wallets
  2. Deploy contracts with scripts/deploy.sh
  3. docker-compose up to launch keepers + frontend
  4. Seed vault with scripts/seed-vault.sh
  5. Monitor at localhost:3000