Skip to content

feat: @makora/solprism — verifiable reasoning for DeFi decisions - #3

Open
austinatneuko wants to merge 1 commit into
IsSlashy:gsd/phase-1-foundationfrom
austinatneuko:feature/solprism-integration
Open

feat: @makora/solprism — verifiable reasoning for DeFi decisions#3
austinatneuko wants to merge 1 commit into
IsSlashy:gsd/phase-1-foundationfrom
austinatneuko:feature/solprism-integration

Conversation

@austinatneuko

Copy link
Copy Markdown

🔮 SOLPRISM × Makora Integration

The problem

Makora is an autonomous DeFi agent managing real money. When an AI handles your portfolio, "trust me" isn't enough — you need cryptographic proof of correct reasoning.

What this adds

SOLPRISM is a commit-reveal protocol for verifiable AI reasoning on Solana. This PR adds a new @makora/solprism package that creates reasoning pre-commitments at every OODA phase.

How it maps to Makora's architecture

Makora Phase SOLPRISM Trace What's Captured
ORIENT commitStrategy() LLM analysis, sentiment, allocation, Polymarket signals
DECIDE commitOODACycle() Full cycle: proposed → approved → rejected actions
ACT commitExecution() Trade result, tx signature, portfolio impact
VETO commitRiskVeto() Which risk checks failed, why it was blocked

Usage

import { SolprismTracer } from '@makora/solprism';

const tracer = new SolprismTracer({ agentName: 'my-makora' });

// ORIENT phase
tracer.commitStrategy({
  sentiment: 'bullish', confidence: 72,
  allocation: { stake: 40, lend: 30, lp: 20, hold: 10 },
  reasoning: 'SOL momentum strong...',
  portfolioValueUsd: 5000,
});

// DECIDE phase
tracer.commitOODACycle({
  phase: 'decide',
  portfolioValueUsd: 5000,
  proposedActions: [...],
  approvedActions: [...],
  rejectedActions: [],
  mode: 'autonomous',
});

// Verify any commitment later
const valid = tracer.verify(commitment.hash, commitment.trace);

Package structure

packages/solprism/
├── src/
│   ├── index.ts      # Public exports
│   ├── tracer.ts     # SolprismTracer (high-level API)
│   ├── traces.ts     # Trace builders (OODA, VETO, execution, strategy)
│   ├── hash.ts       # SHA-256 hashing (SOLPRISM SDK compatible)
│   └── types.ts      # ReasoningTrace types
├── package.json      # Follows monorepo conventions
├── tsconfig.json
├── tsup.config.ts
└── README.md

Zero risk

  • New package only — zero changes to existing Makora code
  • ✅ Follows monorepo conventions (tsup, workspace deps, turbo)
  • No new external dependencies (uses Node.js crypto)
  • ✅ Compatible with @solprism/sdk for onchain commits when needed
  • ✅ Opt-in: import only when you want verifiable reasoning

Links

  • 🏗️ SOLPRISM SDK (@solprism/sdk@0.1.0)
  • 🔗 Program: CZcvoryaQNrtZ3qb3gC1h9opcYpzEP1D9Mu1RVwFQeBu

Built for the Solana Agent Hackathon 🔮

Add SOLPRISM commit-reveal integration as a new package in the monorepo.
Creates cryptographic pre-commitments for every OODA cycle decision,
making the LLM-powered DeFi agent's reasoning verifiable on Solana.

Integration points:
- ORIENT: LLM analysis, sentiment, allocation, Polymarket signals
- DECIDE: Full OODA cycle decisions (proposed/approved/rejected)
- ACT: Execution results with portfolio impact
- VETO: Risk manager rejections with failed check details

Package structure:
- packages/solprism/src/tracer.ts: SolprismTracer high-level API
- packages/solprism/src/traces.ts: Trace builders for each OODA phase
- packages/solprism/src/hash.ts: SHA-256 hashing (SOLPRISM SDK compatible)
- packages/solprism/src/types.ts: ReasoningTrace type definitions
- packages/solprism/README.md: Usage documentation

Key points:
- Pure addition, zero changes to existing Makora packages
- Follows monorepo conventions (tsup, workspace deps)
- Compatible with @solprism/sdk for onchain commits
- No new external dependencies

SOLPRISM Program: CZcvoryaQNrtZ3qb3gC1h9opcYpzEP1D9Mu1RVwFQeBu
SDK: @solprism/sdk@0.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant