# Tereno Morpho Collateral Guard

> Tereno Morpho Collateral Guard is a paid API for AI agents from www.tereno.xyz, paid per call via x402, $0.75/call, status unknown (last checked 2026-09-14).

Simulates a proposed Morpho borrow or leverage action to determine if it will breach liquidation thresholds, evaluating health factor buffer and oracle freshness before execution.

## Facts

- Endpoint: POST https://www.tereno.xyz/api/v1/capabilities/morpho.collateral.guard/invoke
- Price: $0.75/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tereno-morpho-collateral-guard-5f27bf0a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cq4F2LFAnZQthx-fRASjG

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tereno-morpho-collateral-guard-5f27bf0a -d '<json body>'
```

Example prompt: Before I borrow an additional 500 USDC on Morpho, can you check if my wallet 0xAbCd...1234 would breach the liquidation threshold on market 0x1234...abcd with my WETH collateral — and confirm the oracle data is still fresh?

## When to prefer this

Choose this endpoint when an AI agent or automated bot needs to pre-validate a Morpho Protocol borrow or leverage action on-chain before signing and submitting the transaction. It is specifically designed for Morpho markets with LLTV-based liquidation logic and oracle-dependent pricing. Prefer it over generic transaction simulation when you need Morpho-specific health factor analysis, LLTV breach detection, and oracle freshness checks bundled into a single call.

## Known failure modes

- Invalid or unknown Morpho market ID returns an error or empty result
- Stale oracle data detected — endpoint reports freshness failure and recommends aborting
- Borrow amount exceeds available liquidity — simulation returns breach warning
- Invalid wallet address format returns schema validation error
- Market not found or deprecated — returns error indicating market unavailability
- Oracle price deviation too high — flags risk and returns no-go verdict

## How this service works

Will this borrow/leverage action breach Morpho liquidation thresholds? Simulate user position against declared LLTV, evaluate health factor buffer, and check oracle freshness before execution.

## Output

Returns a structured verdict indicating whether the proposed borrow action is safe to execute, including: whether the LLTV threshold would be breached, the resulting health factor and its buffer margin, oracle freshness status for the market, and an overall go/no-go recommendation for the action.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "marketId": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{64}$",
   "description": "Morpho market identifier (32 bytes hex)."
  },
  "loanToken": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Borrow/loan asset address."
  },
  "userAddress": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Borrower wallet address."
  },
  "borrowAmountWei": {
   "type": "string",
   "pattern": "^[0-9]+$",
   "description": "Additional borrow amount in wei."
  },
  "collateralToken": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Collateral asset address."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tereno-morpho-collateral-guard-5f27bf0a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.tereno.xyz](https://www.zero.xyz/host/www.tereno.xyz/llms.txt)
