Documentation

Everything you need to know about Kazt, ACE rules, and the Rule Forge. From concept to on-chain deployment.

01 -- What is ACE?

ACE (Application Controlled Execution) is a framework that lets Solana protocols define their own transaction execution rules. Instead of relying on default validator ordering -- where the leader node decides transaction sequence based on fees and arrival time -- protocols can specify exactly how their transactions are sequenced, batched, matched, and filtered.

In the default Solana execution model, validators process transactions in whatever order they choose. This creates an opportunity for MEV (Maximal Extractable Value) searchers to insert their own transactions before or after yours, extracting profit at your expense. ACE changes this by giving the application control over execution, not the validator.

The term "application controlled" is key. It means the protocol itself -- the DEX, the lending platform, the perpetuals exchange -- gets to define transaction ordering rules, not the block producer. This is a fundamental shift in how Solana transactions are processed. The protocol becomes the authority on execution policy.

ACE rules are deployed through Jito BAM (Block Auction Marketplace), the infrastructure layer that connects protocols to Solana validators. When a protocol publishes ACE rules to BAM, validators that participate in the Jito network agree to respect those rules when producing blocks. This creates an enforceable contract between the protocol and the network.

BAM also integrates with TEE-based encrypted mempools (Trusted Execution Environments). Transactions are encrypted before entering the mempool, so validators and searchers cannot read transaction contents until after ordering decisions are made. This provides a cryptographic guarantee that MEV extraction is not possible, even if a validator is compromised.

TL;DR

ACE = custom transaction execution rules for Solana protocols. Protocols define ordering, batching, matching, priority, and filtering rules. Rules are deployed via Jito BAM and enforced by validators. TEE encryption prevents front-running at the mempool level.

02 -- The MEV Problem

MEV (Maximal Extractable Value) refers to the profit that block producers and searchers can extract by manipulating the order of transactions within a block. On Solana, MEV extraction is estimated to cost regular users $5-10 million per day -- a hidden tax on every swap, every trade, and every DeFi interaction.

Sandwich Attack -- Step by Step

01.You submit a swap: 100 SOL for Token X on a DEX. Your transaction enters the mempool, visible to everyone.
02.An MEV bot detects your pending transaction and calculates the price impact your swap will have.
03.The bot submits a front-run transaction -- buying Token X before you, pushing the price up.
04.Your swap executes at the now-inflated price. You receive fewer tokens than expected.
05.The bot submits a back-run transaction -- selling Token X at the inflated price for instant profit. You are "sandwiched."

Front-running is a simpler variant: a bot sees your pending transaction, submits the same trade with a higher fee to ensure it executes first, and profits from the price movement your transaction will cause. This is possible because default Solana ordering prioritizes fee-paying transactions.

Transaction reordering is the most general form of MEV. Validators or searchers rearrange transaction order within a block to maximize their own profit. This can affect liquidations, arbitrage opportunities, oracle updates, and any time-sensitive DeFi operation.

For regular users, MEV is an invisible cost. You set 1% slippage on a swap thinking that is your maximum cost, but MEV bots consistently push you to that slippage limit, extracting the difference as profit. Over time, this amounts to billions of dollars transferred from regular users to sophisticated automated systems.

How ACE Solves It

ACE eliminates MEV by removing the validator's ability to reorder transactions for profit:

  • Ordering rules enforce FIFO or fair sequencing -- bots cannot jump the queue
  • Batching rules group transactions so there is no "before" or "after" to exploit
  • Filter rules block known MEV bot addresses before they enter the pipeline
  • TEE encryption hides transaction contents until after ordering is decided

03 -- Why Kazt?

Today, writing ACE rules requires deep expertise in Rust, Solana's runtime, the Anchor framework, and the Jito BAM SDK. A typical rule configuration takes 3-7 days of manual coding by an experienced Solana developer, and around 40% of Jito BAM setups fail on the first attempt due to configuration complexity, parameter mismatches, or dependency errors.

This means only well-funded protocol teams with dedicated Solana developers can protect their users from MEV. Smaller protocols, individual traders, and new projects are left exposed.

Kazt is a visual ACE rule builder. It replaces the entire manual coding process with a drag-and-drop canvas where you assemble rule blocks, connect them to define execution flow, simulate with sample transactions, and export production-ready code. No Rust knowledge required. No command-line tools. No configuration files to manually edit.

Before Kazt vs. After Kazt

Before (CLI)

  • 3-7 days development time
  • Requires Rust + Anchor expertise
  • 40% first-attempt failure rate
  • No simulation before deploy
  • Manual conflict checking

After (Kazt)

  • 15-30 minutes to build
  • Visual drag-and-drop interface
  • Built-in validation catches errors
  • Simulate before deployment
  • Automatic conflict detection

For Protocol Teams

Protect your users from MEV without hiring a dedicated Solana/Rust developer. Deploy ACE rules in minutes instead of days. Iterate on rule configurations with instant visual feedback.

For Individual Traders

Understand how MEV protection works by building and simulating rules. Use the marketplace to purchase proven rule configurations from experienced builders.

For Developers

Rapid prototyping for ACE rules. Build visually, export as Anchor IDL, then customize the generated Rust code in your own development environment. Cut days of boilerplate.

04 -- Rule Block Types

Kazt provides five fundamental building blocks that combine to form any ACE rule configuration. Each block represents a distinct phase of transaction processing. Blocks are connected on the forge canvas to define the execution pipeline -- transactions flow through each block in sequence.

You can use any combination of blocks. A minimal rule might use only a Filter and an Ordering block. A comprehensive rule set for a DEX might chain all five: Filter incoming transactions, Batch them into groups, Order within each batch, Match buy and sell sides, then apply Priority scoring for execution preference.

Ordering

Define how transactions are sequenced before execution. Ordering blocks determine the queue discipline applied to incoming transactions. Without explicit ordering, validators use default leader scheduling which is vulnerable to MEV extraction. By enforcing FIFO, price-time, or pro-rata ordering, protocols ensure fair sequencing that cannot be manipulated by searchers or block producers.

  • FIFO (First In, First Out) -- strict arrival-time ordering
  • Price-Time Priority -- highest price wins, ties broken by arrival
  • Pro-Rata Distribution -- allocate proportionally across participants

Batching

Group multiple transactions into a single batch for efficient processing. Batching blocks collect transactions over a configurable time window and execute them atomically. This prevents sandwich attacks because all transactions in a batch are treated as simultaneous -- there is no 'before' or 'after' within a batch for an attacker to exploit.

  • Interval-based batching (50ms - 5000ms windows)
  • Max batch size limits (1 - 200 transactions)
  • Minimum batch threshold before execution

Matching

Determine how buy and sell orders are paired together. Matching blocks define the trade execution engine used to pair counterparties. Different matching engines serve different protocol types -- CLOB for orderbook DEXs, AMM for liquidity pool protocols, and RFQ for institutional or OTC flows.

  • CLOB (Central Limit Order Book) -- traditional price-level matching
  • AMM (Automated Market Maker) -- curve-based liquidity matching
  • RFQ (Request for Quote) -- bilateral quote-driven matching

Priority

Assign priority scores to transactions based on configurable factors. Priority blocks let protocols define what makes a transaction 'important' in their context. Instead of defaulting to fee-based priority (which favors MEV extractors with deep pockets), protocols can weight stake holdings, token balances, or custom criteria.

  • Stake-weighted priority -- higher SOL stake = higher priority
  • Fee-based priority -- higher tip = higher priority
  • Token-hold priority -- protocol token holders get preference

Filter

Screen transactions before they enter the execution pipeline. Filter blocks act as gatekeepers, allowing protocols to block known MEV bots, enforce transaction size limits, or restrict access to whitelisted addresses. Filters run before all other blocks, so rejected transactions never consume processing resources.

  • Address blacklist -- block known MEV bots and bad actors
  • Address whitelist -- restrict to approved participants only
  • Transaction size limits (min and max SOL value)
  • Custom filter conditions based on instruction data

05 -- Block Parameters

Each block type has configurable parameters that control its behavior. When you select a block on the forge canvas, its parameters appear in the properties panel on the right side. This section is a complete reference for every parameter available on each block type.

Parameters with enum types present a dropdown selector. Numeric parameters show a slider with min/max bounds. Boolean parameters are toggles. Address arrays open an editor where you can paste Solana public keys one per line.

Ordering Parameters

ParameterTypeValuesDescription
methodenumFIFO | price_time | pro_rataQueue discipline for incoming transactions
tiebreakerenumtimestamp | fee | randomHow to resolve ties when two transactions have equal priority

Batching Parameters

ParameterTypeValuesDescription
interval_msint50 - 5000Time window in milliseconds to collect transactions before executing the batch
max_batchint1 - 200Maximum number of transactions per batch
min_batchint1 - 50Minimum transactions required to trigger batch execution

Matching Parameters

ParameterTypeValuesDescription
engineenumclob | amm | rfqTrade matching algorithm used to pair buy and sell orders
partial_fillbooltrue | falseWhether to allow partial order fills or require all-or-nothing execution

Priority Parameters

ParameterTypeValuesDescription
factorenumstake | fee | token_holdThe metric used to calculate transaction priority score
weightfloat0.1 - 10.0Multiplier applied to the priority factor (higher = more impact)

Filter Parameters

ParameterTypeValuesDescription
blacklistaddress[]Pubkey listArray of Solana addresses to block from submitting transactions
whitelistaddress[]Pubkey listArray of Solana addresses allowed to submit (if set, all others blocked)
max_sizefloat0.01 - 100000 SOLMaximum transaction value in SOL
min_sizefloat0.001 - 1000 SOLMinimum transaction value in SOL

06 -- How Rule Forge Works

The Rule Forge is Kazt's core interface -- a visual canvas built on React Flow where you assemble ACE rule pipelines by dragging, dropping, and connecting blocks. The forge is divided into three areas: a block palette on the left, the canvas in the center, and a properties panel on the right.

The block palette contains all five block types (Ordering, Batching, Matching, Priority, Filter) as draggable items. Click or drag a block to place it on the canvas. The canvas is an infinite, pannable workspace where blocks appear as nodes with input and output ports. Connect blocks by dragging from an output port to an input port -- this defines the transaction flow. The properties panel shows the configurable parameters for whichever block is currently selected.

As you build, the forge provides real-time validation feedback. Invalid connections (like connecting two output ports) are rejected. Circular dependencies are detected and highlighted with a red border. Conflicting parameters (like a Filter block with the same address on both blacklist and whitelist) trigger a warning badge on the block.

01

Design

Drag rule blocks from the palette onto the canvas. Connect them to define execution flow. Each block has configurable parameters you can tune in the properties panel. Zoom in and out with scroll, pan by dragging empty canvas space. Blocks snap to a grid for clean layouts.

02

Validate

The built-in conflict detection engine checks for circular dependencies, duplicate block types, and parameter mismatches in real time. Issues appear as colored badges on affected blocks -- red for errors (must fix before export), yellow for warnings (recommended to fix). The validation panel lists all issues with one-click navigation to the problem block.

03

Simulate

Run 1-20 sample transactions through your rule pipeline. The simulator generates realistic transaction data including normal swaps, potential sandwich attacks, and edge cases. See which transactions get included, filtered, reordered, or batched. A detailed report shows the outcome for each transaction. See the Simulation section below for full details.

04

Export

Export your rules as JSON for storage and sharing, or generate Anchor IDL code for direct on-chain deployment via Jito BAM. JSON export is available at Basic tier and above. Anchor IDL export requires Pro tier. See the Export & Deploy section below for full details on each format.

07 -- Simulation

The simulator is your testing ground before deploying rules to mainnet. It generates realistic sample transactions and runs them through your rule pipeline, showing you exactly how each transaction would be processed. This catches configuration errors, unexpected filter behavior, and performance issues before they affect real users.

You can run simulations with 1 to 20 transactions per run. The simulator generates a mix of transaction types: normal swaps, potential sandwich attack pairs, large transactions near size limits, and edge cases specific to your block configuration. Each simulation run produces a detailed SimulationReport.

Transaction Outcomes

INCLUDEDTransaction passed all filters and was included in the execution pipeline. The report shows its final position in the ordering queue.
FILTEREDTransaction was blocked by a Filter block. The report shows which filter rule triggered the rejection (e.g., blacklisted address, exceeded max_size).
BATCHEDTransaction was collected into a batch by a Batching block. The report shows which batch it belongs to and how many other transactions share that batch.
REJECTEDTransaction failed validation or caused a conflict in the pipeline. The report shows the specific error and which block rejected it.

SimulationReport Contents

total_txns: number of transactions in the simulation

included: count and list of included transactions

filtered: count and list of filtered transactions with reasons

batched: count and batch assignments

rejected: count and error details

ordering: final transaction sequence after all rules applied

conflicts: any detected rule conflicts or warnings

exec_time_ms: simulation execution time in milliseconds

Interpreting conflict warnings: If the simulator detects that two blocks produce conflicting results (for example, a Priority block promotes a transaction that a Filter block would reject), it generates a conflict warning. Conflict warnings do not prevent the simulation from completing, but they indicate that your rule set may behave unpredictably. Resolve all warnings before exporting for production use.

08 -- Export & Deploy

Once your rules pass validation and simulation, you can export them in two formats. The format you choose depends on your workflow and tier level.

JSON Export

Available: Basic tier+

Exports your entire rule set as a structured JSON file. This is the universal format -- it can be stored in version control, shared with teammates, loaded back into the forge, or used as input for custom deployment scripts.

Contents:

  • Rule metadata (name, version, author)
  • Block definitions with all parameters
  • Connection graph (block-to-block edges)
  • Canvas layout positions
  • Last simulation results

Anchor IDL Export

Available: Pro tier+

Generates production-ready Rust code using the Anchor framework. This is compilable Solana program code that implements your rule set as an on-chain program, complete with instruction handlers, account validation, and error types.

Contents:

  • Anchor program scaffold (lib.rs)
  • Instruction definitions for each rule
  • Account structs and validation logic
  • IDL JSON for client generation
  • Jito BAM configuration manifest

Jito BAM Deployment Flow

01.Export your rule set as Anchor IDL from the forge (requires Pro tier or above).
02.Compile the generated Rust code using anchor build. The code is pre-configured for the Jito BAM SDK.
03.Deploy the program to Solana devnet for testing using anchor deploy.
04.Register your ACE rules with Jito BAM using the included configuration manifest. This notifies validators to respect your rules.
05.Deploy to mainnet. At Elite tier and above, Kazt can handle the entire deployment process from the web UI.

09 -- Tier System

The tier system controls access to Kazt features based on how many $KAZT tokens you hold in your connected wallet. Tiers are determined in real time -- the moment your token balance crosses a threshold, your tier updates automatically. There is no staking or locking required; simply holding the tokens in your wallet is sufficient.

The tier system exists for two reasons: (1) to align incentives between power users and the protocol, and (2) to manage backend resources. Higher tiers consume more compute (simulation, code generation, on-chain deployment), so token holding ensures sustainable infrastructure costs.

Rate Limits by Tier

TierThresholdDesigns/DaySimulations/Day
Free0 KAZT310
Basic1,000 KAZT50200
Pro10,000 KAZT5002,000
Elite100,000 KAZTUnlimitedUnlimited
Whale1,000,000 KAZTUnlimitedUnlimited

Hold $KAZT tokens to unlock progressively more powerful forge capabilities.

Free

3 designs / day0 KAZT
3 designs per daySimulate rulesNo save or exportCommunity support only

Basic

50 designs / day100,000 KAZT
50 designs per daySave up to 10 rulesJSON exportEmail support

Pro

500 designs / day1,000,000 KAZT
500 designs per dayUnlimited savesAnchor code generationBAM config exportPriority support

Elite

Unlimited5,000,000 KAZT
Unlimited designsOn-chain deploymentMarketplace accessAPI accessDedicated support channel

Whale

Unlimited25,000,000 KAZT
All Elite featuresReduced marketplace fees (2.5%)Priority support with SLAEarly access to new featuresGovernance voting rights

10 -- Template Marketplace

The Template Marketplace is where experienced ACE rule builders publish verified rule sets and other users purchase them. Think of it as a library of battle-tested MEV protection configurations that you can buy, load into your forge, customize, and deploy -- all without building from scratch.

Templates are priced in $KAZT tokens. The standard fee split is 95% to the seller, 5% to the protocol treasury. Whale tier sellers enjoy a reduced protocol fee of 2.5%, receiving 97.5% of each sale. This incentivizes experienced builders to create and maintain high-quality templates.

For Buyers

Browse verified templates with descriptions, block counts, preview visualizations, and seller reputation scores. Each template shows which block types are included and what parameters are pre-configured.

After purchase, the template loads directly into your forge canvas. All blocks, connections, and parameters are pre-set. You can use the template as-is or customize any parameter to fit your protocol's specific needs.

For Sellers

Build, test, and publish your rule configurations to earn $KAZT from every sale. To publish, your template must pass validation with zero errors and include at least one successful simulation run.

Set your own price in $KAZT. Provide a clear description, use-case tags, and recommended protocol types. Templates with more sales and positive ratings rank higher in marketplace search results.

How to Publish a Template

01.Build your rule set in the forge. Ensure it passes validation with zero errors.
02.Run at least one successful simulation. The simulation results are included with your template listing.
03.Click "Publish to Marketplace" in the export menu. Set your price, write a description, and add use-case tags.
04.Your template goes through a brief automated review (parameter sanity checks, block count verification). Once approved, it appears in the marketplace.

Seed Templates

DEX AMM Protection Pack -- FIFO ordering + 200ms batching for AMM pools
Lending Protocol Guard -- Priority by stake + liquidation size filter
Orderbook Fairness Pack -- Price-time ordering + CLOB matching engine
NFT Mint Guard -- Whitelist filter + pro-rata ordering for fair mints
Perpetuals MEV Shield -- Batch + filter + priority for perp exchanges
Staking Reward Sequencer -- FIFO ordering + min batch for reward distribution
Bridge Transaction Shield -- Filter + priority by token hold for cross-chain
DAO Governance Pack -- Pro-rata ordering + stake-weighted priority for voting

11 -- Architecture

This section is for technically curious users who want to understand how Kazt is built under the hood. Kazt follows a standard modern web architecture with a Next.js frontend, a FastAPI backend, and integrations with Solana infrastructure.

Frontend

  • Next.js 14 -- App Router, server components, API routes
  • Tailwind CSS -- Utility-first styling with custom pixel-art theme
  • React Flow -- Node-based graph editor for the rule canvas
  • Three.js -- 3D scenes for landing page and visual effects
  • Deployed on Vercel -- Edge network, automatic CI/CD from Git

Backend

  • FastAPI (Python) -- Async REST API, auto-generated OpenAPI docs
  • PostgreSQL -- Primary database for rules, users, templates
  • Redis -- Caching tier levels, rate limiting, session data
  • Deployed on Railway -- Managed infrastructure with auto-scaling

Blockchain Integrations

  • Helius RPC -- High-performance Solana RPC node for on-chain reads (token balances, transaction history)
  • Jito BAM SDK -- Official SDK for publishing ACE rules to the Block Auction Marketplace
  • Anchor Framework -- Code generation target for on-chain ACE rule programs

System Flow Diagram

+----------+    +----------+    +-----------+
|          |    |          |    |           |
|  User    +--->+  Web App +--->+  Rule     |
| (Browser)|    | (Next.js)|    |  Canvas   |
|          |    |          |    | (React    |
+----------+    +-----+----+    |  Flow)    |
                      |         +-----+-----+
                      |               |
                +-----v----+   +------v------+
                |          |   |             |
                | FastAPI  |   | Validator   |
                | Backend  |   | (conflict   |
                | (Python) |   |  detection) |
                |          |   |             |
                +-----+----+   +------+------+
                      |               |
                +-----v----+   +------v------+
                |          |   |             |
                | Postgres |   | Simulator   |
                | + Redis  |   | (test txns) |
                |          |   |             |
                +----------+   +------+------+
                                      |
                               +------v------+
                               |             |
                               | Exporter    |
                               | (JSON /     |
                               |  Anchor)    |
                               +------+------+
                                      |
                               +------v------+
                               |             |
                               | Jito BAM    |
                               | (on-chain   |
                               |  deploy)    |
                               +-------------+

API Endpoints (Preview)

POST /api/v1/rules/create -- Create a new rule set

GET /api/v1/rules/{id} -- Retrieve a rule set by ID

POST /api/v1/simulate -- Run a simulation against a rule set

POST /api/v1/export/json -- Export rule set as JSON

POST /api/v1/export/anchor -- Export rule set as Anchor IDL

GET /api/v1/marketplace -- Browse marketplace templates

POST /api/v1/marketplace/publish -- Publish a template

GET /api/v1/user/tier -- Check current user tier level

12 -- FAQ

Do I need to know Rust to use Kazt?

No. Kazt is a fully visual builder. You drag blocks onto a canvas, configure parameters through a properties panel, and the forge generates production-ready Rust code (Anchor IDL) or JSON configuration for you. You never need to write a single line of Rust, though you can always inspect and modify the generated output if you choose.

How accurate is the simulation?

The simulator runs your rules against realistic sample transaction data including normal swaps, potential sandwich attacks, and edge cases. It accurately models how your rule pipeline would process each transaction. However, on-chain behavior may differ under extreme network congestion or if the underlying protocol changes its transaction format. We recommend testing on devnet before mainnet deployment.

Can I export and modify the generated code?

Yes. JSON export is always available at Basic tier and above. Anchor IDL export (which generates Rust code) is available at Pro tier and above. Both formats are fully editable -- you own the output. Many advanced users export from Kazt, then fine-tune specific parameters in their own development environment before deploying.

What happens if my rules conflict with each other?

The built-in conflict detection engine performs real-time dependency graph analysis as you build. It catches circular references (Block A depends on Block B which depends on Block A), duplicate ordering rules, contradictory filter settings (same address on both blacklist and whitelist), and parameter mismatches. You cannot export a rule set that has unresolved conflicts.

How does the Template Marketplace work?

The marketplace lets experienced builders publish verified rule templates that other users can purchase with $KAZT tokens. Each template includes a description, block count, preview visualization, and the seller's verification status. After purchase, the template loads directly into your forge canvas where you can customize it. Sellers receive 95% of each sale (2.5% for Whale tier sellers), with the remainder going to the protocol treasury.

What is $KAZT used for?

$KAZT is the SPL utility token that powers the Kazt ecosystem. Its primary uses are: (1) Hold tokens to unlock forge tiers with progressively more features, (2) Purchase templates from the marketplace, (3) Earn by selling your own templates, (4) Access premium features like on-chain deployment and API access. The token is on the Solana blockchain and can be traded on supported DEXs.

Is Kazt free to use?

Yes, the Free tier lets you create up to 3 rule designs per day and run simulations without holding any $KAZT tokens. However, Free tier does not include save or export functionality. To unlock saving, exporting, and advanced features, you need to hold $KAZT tokens to qualify for a higher tier (Basic starts at 100,000 KAZT).

How do I connect my wallet?

Click the 'Connect Wallet' button in the top navigation bar. Kazt supports all major Solana wallets including Phantom, Solflare, Backpack, and Ledger (via adapter). Once connected, the app automatically reads your $KAZT token balance to determine your tier level. Your wallet address is also used to sign rule exports and marketplace transactions.

What blockchains does Kazt support?

Kazt is built exclusively for Solana. ACE (Application Controlled Execution) is a Solana-native framework, and the Jito BAM (Block Auction Marketplace) operates only on the Solana network. There are currently no plans to support other chains, as the ACE framework is tightly integrated with Solana's validator architecture and leader scheduling.

Is my data stored? What about privacy?

Rule designs for logged-in users (Basic tier and above) are stored in our PostgreSQL database, encrypted at rest. Your wallet address and tier level are cached in Redis for performance. We do not store your private keys -- wallet interactions are handled entirely client-side through standard Solana wallet adapters. Free tier users' designs exist only in browser memory and are lost when the page is closed.

Can I use Kazt without holding any tokens?

Yes. The Free tier is available to everyone with zero $KAZT balance. You can design up to 3 rule sets per day and run simulations to learn how ACE rules work. This is a great way to explore the platform before committing to a token purchase. However, you will need at least Basic tier (100,000 KAZT) to save your work or export configurations.

What is the difference between JSON export and Anchor IDL export?

JSON export produces a human-readable configuration file that describes your rule set -- block types, connections, and all parameters. This is useful for storage, sharing, version control, and loading back into the forge. Anchor IDL export generates actual Rust program code using the Anchor framework, ready for compilation and on-chain deployment via Jito BAM. JSON is available at Basic tier; Anchor IDL requires Pro tier or above.

Pour your rules. Set them in chain.