Skip to content

Instantly share code, notes, and snippets.

View zmanian's full-sized avatar

Zaki Manian zmanian

View GitHub Profile
@zmanian
zmanian / swig-ai-agent-confinement.md
Created March 7, 2026 16:11
Swig Wallet: Confining AI Agents with Post-Execution Enforcement

Swig Wallet: Confining AI Agents with Post-Execution Enforcement

The Problem

You want an AI agent to execute trades on your behalf -- picking venues, routes, and parameters autonomously. But you need guarantees that the agent can't drain your wallet, pick a malicious venue, or cause unbounded losses.

Traditional approaches require whitelisting every program, instruction format, and parameter. This is brittle, high-maintenance, and breaks whenever a new DEX or aggregator launches.

The Idea: Outcome-Based Confinement

@zmanian
zmanian / 2026-03-02-trajectory-benchmarks-design.md
Last active March 2, 2026 18:04
IronClaw Trajectory Benchmark System - Full Design

Trajectory Benchmark System

Date: 2026-03-02 Status: Design Goal: Evaluate agent quality across real user flows -- catch regressions when code changes, measure improvements when new tools/skills are added.

Overview

A benchmark system that runs real user scenarios through the real agent loop with real LLM calls, then evaluates the resulting trajectory using two layers:

@zmanian
zmanian / real-yield-eth-withdrawal-blocked.md
Created March 1, 2026 09:27
Real Yield ETH -- Withdrawals Blocked: Root Cause & Required Strategist Rebalance

Real Yield ETH -- Withdrawals Blocked: Root Cause & Resolution

Date: 2026-03-01 Cellar: Real Yield ETH (0xb5b29320d2dde5ba5bafa1ebcd270052070483ec) Chain: Ethereum Mainnet Status: Users cannot withdraw. Strategist rebalance required.


Summary

@zmanian
zmanian / zcash-pow-analysis.md
Created March 1, 2026 01:18
Zcash PoW Algorithm Change Tradeoffs: Equihash, Blake3, and ZK-Friendly PoW Analysis

RYUSD Arbitrum: Why Withdrawals Are Forced Into the Queue

Summary

All withdrawals from RYUSD on Arbitrum (0x392B1E6905bb8449d26af701Cdea6Ff47bF6e5A8) are being routed to the withdrawal queue because totalAssetsWithdrawable reports only $3.97 USDC out of $29,303 total assets (0.014% liquid). The ~$27,300 in Aave V3 aToken positions are not counted as withdrawable due to two compounding configuration issues in the Aave V3 aToken Adaptor.

On-Chain State (2026-02-26)

Metric Value

IronClaw: How Skills Sandboxing in Docker Prevents Prompt Injection

An analysis of how IronClaw's skills system and Docker sandbox work together to prevent prompt injection from manipulating the top-level agent.

1. Tool Attenuation (Hardest Boundary)

The strongest defense. When an installed (untrusted) skill activates, the dispatcher in src/agent/dispatcher.rs:178-194 calls attenuate_tools() which physically removes dangerous tools from the LLM's context. The model only sees 8 read-only tools:

  • memory_search, memory_read, memory_tree, time, echo, json, skill_list, skill_search
@zmanian
zmanian / gist:a24ca70cffc7848c951c878eabe273bc
Last active February 18, 2026 00:14
Sender-Controlled Transaction Privacy & MEV Supply Chain via Mosaik Streams (with code sketch)

Sender-Controlled Transaction Privacy & MEV Supply Chain via Mosaik Streams

Design notes and working code sketch for integrating priority auctions, competitive builder marketplaces, and sender-controlled transaction privacy into Mosaik-based consensus architectures (Commonware Simplex, CometBFT).

Code: zmanian/commonware-mempool (compiles and runs)

Context

Mosaik provides typed Producer<T> / Consumer<T> streams with tag-based discovery and subscribe_if predicate re-evaluation. Combined with Commonware Simplex BFT, this gives us a dual-stack architecture where consensus traffic runs on Commonware's authenticated P2P and transaction dissemination runs on Mosaik streams.

@zmanian
zmanian / mosaik-mempool-analysis.md
Created February 16, 2026 05:09
Mosaik as a Framework for Typed Mempools with Integrated Order Matching -- exploring whether Mosaik can replace CometBFT/Commonware mempool patterns

Mosaik as a Framework for Typed Mempools with Integrated Order Matching

Exploring whether Mosaik -- Flashbots' self-organizing p2p runtime -- could serve as the foundation for a high-performance mempool (in the style of Commonware or CometBFT) that collapses transaction dissemination, order matching, and block production into a single pipeline.

The Traditional Mempool Pipeline

In CometBFT and most blockchain architectures, the pipeline is segmented:

Tx submission -&gt; Mempool gossip (opaque bytes) -&gt; Block proposer selects txs
@zmanian
zmanian / mosaik-intents-analysis.md
Created February 16, 2026 05:09
Mosaik as an Intent Settlement Coordination Layer -- analysis of how Mosaik's p2p primitives map onto orderflow/solver/auction systems and NEAR Intents

Mosaik as an Intent Settlement Coordination Layer

Analysis of Mosaik (v0.2.1) -- a Rust runtime for self-organizing, leaderless distributed systems built on iroh (QUIC-based p2p networking) -- and how its primitives map onto intent-based orderflow systems like NEAR Intents.

What Mosaik Is

Nodes deployed on plain VMs self-organize into a functioning topology using just a secret key, a gossip seed, and role tags. No orchestration needed. Four subsystems:

  • Discovery -- gossip-based peer announcement + catalog sync
  • Streams -- typed pub/sub data channels (producer/consumer)
@zmanian
zmanian / gist-near-intents.md
Created February 16, 2026 04:54
Decentralized NEAR Intents Settlement on Mosaik

Decentralized NEAR Intents Settlement on Mosaik

Problem

NEAR Intents (formerly Defuse Protocol) coordinates intent-based settlement across 18+ chains. The current architecture relies on a centralized Solver Relay (solver-relay-v2.chaindefuser.com) as the sole coordination point between users and solvers. This is a single point of failure, a censorship vector, and a trust assumption on the relay operator.

Real NEAR Intents Protocol

Token Diff Model