Loops HouseTrellis

NEAR HACKATHON
Links
Team
1 member- KOOwner
Kongphop
Overview
The problem: AI agents can now manage DeFi positions, but handing one your keys means trusting it completely. If the agent is wrong, hacked or goes rogue, your funds are gone. And without an agent, a leveraged position can be liquidated while you sleep.
What we built: Trellis, an AI DeFi agent on NEAR that can only act inside rules you set. You sign your rules once: which tokens and pools, how much per action and per day, and the lowest health factor allowed. A personal vault contract holds the funds and checks every agent action against those rules on-chain. The agent manages a leveraged lending position on Rhea (Burrow) and swaps on Ref. When prices crash, it deleverages before liquidation with no signature from you. In chat you ask in plain English, and a Risk Guardian shows the health factor, cost and price check before anything runs.
How NEAR fits in:
- The vault is a Rust contract on NEAR with no access keys. No agent method takes a recipient, spending caps are reserved before funds move, and every borrow or withdrawal is re-checked against live Rhea risk settings and oracle prices.
- The agent's key is generated and held in a TEE (OutLayer, Intel TDX), so no server or person ever holds it.
- Chat runs on NEAR AI Cloud. The AI only proposes; it never signs.
- NEAR Intents brings funds in from Bitcoin, Ethereum, Base, Arbitrum or Solana (mainnet).
Proof on NEAR testnet: NEAR crashed to $1.75 and the agent protected the position by itself (health factor 1.25 back to 2.14). Then we made the agent go rogue: the vault refused all four moves on-chain. Every transaction is linked in the README.