Loops HouseLifeguard

NEAR HACKATHON (Test)
Team
1 member- TEOwner
Temitayo Daniel
Overview
Aave borrowers get liquidated when they can't react in time, and the usual fix is a bot holding keys that could just as easily borrow more or withdraw the collateral. Lifeguard is an AI agent that can repay a loan but cannot hurt it, and NEAR enforces that. The loan sits on Aave V3 (Base Sepolia) at an address derived for a NEAR contract through chain signatures. The agent holds only a NEAR function-call key for two methods, request_action and confirm. The contract accepts only supply, repay and capped approvals; it builds every byte of the Base transaction itself, fixes the destination and beneficiary, caps fees and daily actions, and only then asks NEAR's MPC network to sign. A relayer broadcasts it, and the contract counts it only after Read MPC confirms it succeeded on Base. A keeper watches the health factor; below 1.25 it asks a model on NEAR AI Cloud how large a safety buffer to repay, and the model's answer is signed in its enclave and can be checked with verify-decision.js. On 5 Nov a loan fell from health factor 1.90 to 1.20; the model saw the sharp drop and chose a 15% buffer, and the agent repaid 824.55 USDC, back to 2.082, confirmed by Read MPC 2 min 53 s after the decision, with nobody touching it. Eight attacks with the agent's real key (borrow two ways, withdraw, approve above the cap, supply an unlisted token, drain gas, rewind the nonce, send NEAR away) are refused by NEAR's access key or by the contract, and anyone can fire them live at https://lifeguard.timidan.xyz. You can open your own loan there with a NEAR testnet wallet in two approvals, or connect your own agent through the included MCP server. Testnet only; no users or revenue yet.