Skip to content

Commit 879d9f4

Browse files
author
Achilles
committed
feat: Implement full Execution Protocol API with validation, execution, and reputation endpoints
- POST /api/v1/validate - Validates trading opportunities with risk scoring - POST /api/v1/execute - Executes approved decisions with approval tokens - GET /api/v1/reputation/:agent - Returns agent reputation scores - GET /api/v1/stats - System-wide statistics - POST /ep/validate - Legacy backward-compatible endpoint - Fee calculation: max(0.5%, 0.01 ETH) - State persistence to JSON file - Updated render.yaml for Node.js service deployment Fixes: /ep/validate endpoint now operational Revenue: Ready for Virtuals ACP integration
1 parent 2961e13 commit 879d9f4

3 files changed

Lines changed: 376 additions & 43 deletions

File tree

data/ep-state.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"decisions": {
3+
"d-1773212171478": {
4+
"decision_id": "d-1773212171478",
5+
"status": "approved",
6+
"confidence_score": 0.87,
7+
"risk_level": "medium",
8+
"max_allocation": 1000,
9+
"fee": {
10+
"amount_eth": "5.0000",
11+
"amount_usd": "12500.00",
12+
"basis_points": 50
13+
},
14+
"attestation_uid": null,
15+
"timestamp": "2026-03-11T06:56:11.478Z",
16+
"agent_id": "test-agent-001",
17+
"opportunity": {
18+
"type": "hyperliquid_funding",
19+
"asset": "ETH",
20+
"expected_return": 0.05,
21+
"confidence": 0.87,
22+
"max_capital": 1000
23+
},
24+
"executed": false
25+
}
26+
},
27+
"attestations": [],
28+
"agents": {},
29+
"stats": {
30+
"totalValidations": 1,
31+
"totalExecutions": 0,
32+
"totalFeesCollected": 0,
33+
"totalVolume": 0
34+
}
35+
}

render.yaml

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
11
services:
2-
- type: static
2+
- type: web
33
name: execution-protocol
4-
runtime: static
5-
buildCommand: echo "Static site ready"
6-
staticPublishPath: ./docs-site
7-
routes:
8-
- type: rewrite
9-
source: /docs
10-
destination: /docs/index.html
11-
- type: rewrite
12-
source: /api
13-
destination: /api/index.html
14-
- type: rewrite
15-
source: /contracts
16-
destination: /contracts/index.html
17-
- type: rewrite
18-
source: /integration
19-
destination: /integration/index.html
20-
- type: rewrite
21-
source: /virtuals
22-
destination: /virtuals/index.html
23-
headers:
24-
- path: /*
25-
name: Cache-Control
26-
value: public, max-age=3600
4+
env: node
5+
buildCommand: npm install
6+
startCommand: node server.js
7+
envVars:
8+
- key: NODE_ENV
9+
value: production
10+
- key: PORT
11+
value: 10000
12+
healthCheckPath: /api/v1/stats
2713
autoDeploy: true

0 commit comments

Comments
 (0)