Skip to main content

About OctoGate

OctoGate is Untangled Finance's permissioning layer for Stellar DeFi. It governs two separate controls:

  1. Account permissioning — which operations an OpenZeppelin (OZ) smart account is authorized to perform, synthesized from recorded transaction traces.
  2. Venue permissioning — which venues, markets, and counterparties an account is allowed to reach.

Both components are under active development on Stellar testnet.


Account permissioning: OZ Policy Builder​

The OZ Policy Builder is an off-chain toolkit that records a Soroban transaction and synthesises the minimal policy that permits exactly that flow.

Recorded Transaction ──▶ Synthesizer ──▶ OZ Policy ──▶ Install on smart account
(off-chain) │ │
▼ ▼
PolicyIR (intermediate) ProposedPolicy

Key components:

PackageRole
@crediolabs/policy-synthTypeScript synthesis core
@crediolabs/policy-builder-mcpMCP server for AI agent integration
apps/policy-builder-webBrowser UI for the install flow
apps/policy-builder-cliCLI for scripted policy authoring

The tool analyses a transaction trace, extracts the authorized call scope and spending bounds, and compiles them into an OZ-native policy. Where the OZ built-in primitives cannot express a constraint (e.g. per-method scoping or oracle price bounds), those are surfaced as Path B warnings — the policy is not silently weakened.

Install, on-chain verify, simulate, and the Rust interpreter are later phases.

Venue permissioning gate​

The venue permissioning gate controls which venues, markets, and counterparties an account can interact with. It is implemented across three packages:

PackageRole
packages/venue-wrapperHolds restricted-asset wrappers (1:1 wrap of AUTH_REQUIRED + AUTH_REVOCABLE + AUTH_CLAWBACK_ENABLED classic assets)
packages/venue-marketFacade between the venue-wrapper and a Blend v2 pool, needed because a single InvokeHostFunction cannot atomically wrap-then-supply
apps/venue-demo-webBrowser UI demonstrating the full venue gate flow on Stellar testnet

The permissioning itself lives in the wrapper's transfer gate — the venue-market is a pure facade with no durable enforcement.


Current state​

OctoGate's custody contracts are live on Stellar mainnet through Prime, and an external audit is in progress.

  • The OZ Policy Builder — recorder, synthesizer, OZ Accounts adapter (Path A), MCP server, and CLI — are implemented and unit-test-covered.
  • The venue permissioning gate — venue-wrapper + venue-market + Blend v2 integration — is implemented and demonstrated on testnet.
  • Install, on-chain verify, simulate, and the Rust interpreter predicate are later phases.