{"uid":"cap_cq4F2LFAnZQthx-fRASjG","slug":"tereno-morpho-collateral-guard-5f27bf0a","name":"Tereno Morpho Collateral Guard","description":"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.","url":"https://www.tereno.xyz/api/v1/capabilities/morpho.collateral.guard/invoke","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.75","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.75/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.75","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.75","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1o6rs9Ma5UAs1fXgI5s8q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.75","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Pre-borrow liquidation safety check","prompt":"I want to borrow 2000 more USDC on Morpho using my ETH collateral. Can you simulate the position for my wallet 0xAbCd...1234 on market 0x9876...abcd and tell me if my health factor buffer will still be safe after the borrow?"},{"title":"Leverage loop risk validation","prompt":"I'm about to loop leverage on a Morpho market — collateral token 0xAaAa...1111, loan token 0xBbBb...2222, market 0xCcCc...3333. Run a pre-execution guard on my wallet 0xDdDd...4444 for an additional 10 ETH worth of borrowing in wei and check if the oracle is still fresh."},{"title":"Stale oracle detection before borrow","prompt":"Check the oracle freshness on Morpho market 0xEeFf...5678 before I let my bot execute a borrow on behalf of 0xF00d...cafe — I don't want the position to get hit with a bad price feed."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:39:48.505Z","isFirstParty":false}