D-20 · Agent guard
[D-20]Layers
Agent guard
A policy every agent trade must pass before it signs, checked live and callable as one GET request.
The gates#
| Gate | Refuses a trade when |
|---|---|
| Size | it is larger than the cap, in what the agent pays |
| Score | the token's Corbel Score is under the floor |
| Sells go through | a simulated sell back fails |
| Exit pays now | a sale now returns too little of the cost |
| No transfer tax | a transfer tax is found |
| Route fills | no route fills at the latest block |
| Impact | the price impact is over the cap |
| No hooks | the only route is a v4 pool with an unknown hook |
Using it from an agent#
Call the guard before every trade and trade only on allow. Nothing is signed or sent by the guard; it reads and simulates.
GET https://corbel.finance/api/guard?token=0x…&side=buy&pay=USDG&amount=100&minScore=60&maxImpact=0.02&must=honeypot,exit,tax&maxIn=500&hooks=0
→ 200 { "verdict": "allow" | "deny", "rules": [ … ], "failed": [ … ] }