Active Protection
Active Protection
Tessera's most powerful feature: the Watcher can repay your debt before liquidation happens, restoring your health and protecting you from the liquidation penalty. This is opt-in and entirely under your control.
What is active protection?
Active protection allows the Watcher to automatically repay part of your debt from your own pre-approved USDC when your position approaches danger. When health factor approaches 1.1, the Watcher calculates how much USDC repayment would restore your health to a safe level (typically 1.2 or higher). If you have opted in and have sufficient USDC pre-approved, the Watcher repays that amount on your behalf, your debt decreases, liquidation is avoided, and the action is logged in your history.
Key distinction: the Watcher repays from your own USDC, not from any protocol reserve or third party. You choose how much to approve, and you can revoke the approval at any time.
How to enable active protection
- In your wallet, approve the Tessera vault to spend USDC on your behalf. The amount you approve is the ceiling the Watcher cannot exceed.
- Set an allowance amount via a simple slider or input, typically between 1,000 USDC and 100,000 USDC depending on your position size.
Once approved, the Watcher begins monitoring. The next time your health factor falls near the threshold, repayment triggers automatically.
On-chain caps (safety guardrails)
Even if the Watcher's code or private key is compromised, you are protected by two hard limits written directly into the vault contract:
- Per-transaction cap: 10,000 USDC/user/tx. A single repayment cannot exceed this, even if your allowance is higher.
- Per-day cap: 25,000 USDC/user/day. Across all repayments in a calendar day, the Watcher cannot repay more than 25,000 USDC per user. Daily resets at UTC midnight.
These caps are on-chain enforced. The vault contract contains this logic. Even if the agent's code is buggy or its key is compromised, the on-chain ceilings prevent excessive repayment. A compromised agent KEY cannot bypass these limits.
How to disable active protection
Active protection is opt-in and easily disabled: (1) Set allowance to zero — in your wallet, revoke the USDC allowance to the Tessera vault. The Watcher will immediately have no spending power. (2) Or approve a smaller amount if you want to keep some protection but with a tighter cap.
The Watcher checks your allowance on every tick (~10 seconds). A zero allowance disables protection instantly.
Why your allowance is the kill switch
The Watcher's repayment power is entirely bounded by your ERC-20 allowance. This design means: (1) You control the ceiling — you decide the maximum USDC the Watcher can access, with on-chain per-transaction and daily caps as additional guardrails. (2) The Watcher cannot extract value — it cannot repay more than your allowance, cannot repay another user's debt, cannot move any other asset. (3) Revocation is instantaneous — setting your allowance to zero takes effect on the next block. (4) Your balance is a second boundary — even if you approve 100,000 USDC, if you only hold 5,000, the Watcher can access at most 5,000.
The honest limit: active protection does not guarantee safety
If a tokenized stock drops 30% overnight (an extreme but possible scenario), your health factor can cross the liquidation line faster than any on-chain repayment can execute. Active protection reduces the *likelihood* of liquidation by handling small gaps and volatility; it does not guarantee protection against catastrophic price moves. Do not borrow at the edge of your health factor. Borrow conservatively. The Watcher is a risk layer, not insurance.
How repayment is deterministically triggered
The Watcher's decision to repay is based on four deterministic regimes: (1) Regime 0 (Safe) — health factor > 1.2, no action. (2) Regime 1 (Caution) — health factor 1.1–1.2, alerts sent. (3) Regime 2 (Danger) — health factor 1.0–1.1, auto-repay initiated. (4) Regime 3 (Liquidating) — health factor < 1.0, liquidation or permissionless backstop.
When in Regime 2, the Watcher: (1) Calculates the USDC repay amount needed to restore health to Regime 0 (safe). (2) Checks your allowance and balance. (3) Applies the per-transaction and per-day caps. (4) Simulates the repayment via eth_call to ensure it will succeed. (5) If all checks pass, submits the transaction. Every step is transparent and logged in your action history.
Cost of active protection
There is no separate fee. You pay: (1) Transaction gas — the Watcher pays gas from its own float. You do not reimburse it. (2) Interest on the repaid amount — when the Watcher repays 5,000 USDC of your debt, your remaining debt is smaller, so interest owed decreases immediately.
Active protection is economically beneficial: it saves you the 5% liquidation penalty and any additional losses from a forced liquidation.
Monitoring your protection status
From the Borrow page, you can see: (1) Your current health factor and regime (Safe/Caution/Danger/Liquidating). (2) Your USDC allowance to the vault (the protection budget). (3) The auto-repay utilization today (how much of your daily 25,000 USDC cap is used).
The Agent page shows: (1) A log of every auto-repay event with amount repaid, health factor before and after, and reasons for skipping. (2) Open alerts for your position (if health factor < 1.1).