A platform that handles your Bitcoin and your reputation has to earn trust. 0.2.0 is Kaccy earning it.
Today we released Kaccy 0.2.0 — a maturity and production-readiness release that hardens the Bitcoin-native Personal Token Platform with complete documentation, a far deeper test suite, faster bonding-curve math, new Bitcoin and AI modules, and a one-command deployment.
Nothing about the sovereignty story changes, because it was never a feature you bolt on. Kaccy remains Bitcoin-native and self-custodial: value moves in real BTC over Lightning, secured by self-custody, privacy technology, and threshold cryptography — never through a custodial intermediary that owns your audience and takes a cut. It still runs as a single deployable you control, and it is still written entirely in safe Rust with no unsafe in the application layer. What 0.2.0 adds is the thing every serious platform needs before it touches real money: proof, through docs and tests, that it does what it says.
Why Kaccy 0.2.0 is a game changer
A platform can be brilliant and still be untrustworthy in production if its public APIs are undocumented, its trading engine is under-tested, and there is no repeatable way to deploy it. 0.2.0 closes exactly those gaps. The codebase grew from ~206,000 to ~216,560 lines (538 to 567 source files), and almost all of that growth is hardening, not new surface area:
- Complete rustdoc coverage — every public API across all 7 crates now carries
///documentation. Zeromissing_docswarnings workspace-wide. - 375 new tests across the workspace, filling in previously-uncovered trading and model modules — order book, market maker, trade executor, price circuit breaker, staking, token, liquidity, and user.
- 32 property-based invariant tests (via proptest) covering all seven bonding curves — spread, monotonicity, positivity, and price impact — in
kaccy-core/tests/bonding_curve_proptest.rs. - O(1) closed-form bonding curves. The SquareRoot and Logarithmic curves now use exact closed-form antiderivatives, replacing 100-step numerical integration — exact pricing instead of O(100) approximation.
- A repeatable production stack — GitHub Actions CI/CD, a multi-stage distroless Dockerfile, and
docker compose upfor the whole dependency set.
Technical Deep Dive: what’s new under the hood
Schnorr, bech32m, and advanced RPC in kaccy-bitcoin. Kaccy’s Bitcoin layer gained the primitives modern Bitcoin demands. A new schnorr module implements BIP 340 Schnorr signatures — sign, verify, and batch verify over secp256k1. bech32m_utils brings BIP 350 bech32m encode/decode for Taproot addresses. rpc_advanced adds descriptor import/export, block templates, and transaction-priority management. For testing and resilience, mock_explorer ships a MockBlockchainExplorer, a RotatingExplorerClient with round-robin failover, and a TorExplorerClient over SOCKS5. The previously-stubbed tapscript_utils is now documented as implemented.
A memory profiler in kaccy-core. The new kaccy-core::utils::memory_profiler module gives you allocation visibility without leaving safe Rust: a TrackingAllocator<A> (a GlobalAlloc wrapper backed by atomic counters), a MemoryProfiler for baseline/delta snapshots, a MemoryGuard RAII scope that logs its delta via tracing::debug! on drop, and MemoryStats/MemoryDelta value types. Wrap a hot path, get a number.
Custom LLM endpoints in kaccy-ai. The AI oracle is no longer limited to built-in providers. custom_endpoint.rs introduces CustomEndpointClient, a CustomEndpointRegistry, IssuerPersonalization, and an EndpointRequestFormat that speaks OpenAI, Anthropic, or arbitrary custom JSON. CustomAgentConfig now takes an optional custom endpoint URL plus personalization — bring your own model.
A real batch API and a tiered cache. In kaccy-api, the /api/batch endpoint now performs real HTTP execution — sub-requests are routed to the server via reqwest instead of returning mock responses. In kaccy-db, query-result caching is verified complete: a multi-tier L1/L2 cache (DashMap + Redis) with cache warming and cascade invalidation. The sanitization module was re-enabled after tracing a misidentified E0762 “compiler bug” to an unescaped quote in a raw regex literal r"['\";...]", fixed with a hash-delimited raw string r#"..."#; a stale comment claiming the db security module was disabled (it never was) is corrected.
A benchmark harness. A Criterion suite for the bonding curves (spot price, buy/sell price, supply sweep) lives in kaccy-core/benches/bonding_curves.rs, and kaccy-bitcoin gains an end-to-end integration suite — payment flows, multi-party coordination, failure scenarios — plus proptest for its utilities.
Getting Started
0.2.0’s headline operational change is a dockerized path. Instead of standing up PostgreSQL and Redis by hand, bring the whole stack up with one command:
git clone https://github.com/cool-japan/kaccy.git
cd kaccy
docker compose up -d # PostgreSQL 15 + Redis 7 (+ optional bitcoind testnet profile)
cargo run -p kaccy
Helper scripts wrap the common workflows:
./scripts/test.sh # run the workspace test suite
./scripts/lint.sh # clippy + rustfmt
And the new instrumentation is plain Rust. Drop a MemoryGuard around a hot path to log its allocation delta on scope exit:
use kaccy_core::utils::memory_profiler::MemoryGuard;
{
let _guard = MemoryGuard::new("order_book_match");
engine.match_orders(&book);
// on drop, the allocation delta is logged via tracing::debug!
}
What’s New in 0.2.0
In plain language:
- Docs you can actually read. Every public API in all seven crates is documented; the
missing_docscount is zero. - A trading engine that’s tested. 375 new tests cover the order book, market maker, trade executor, circuit breaker, staking, liquidity, and more — plus 32 proptest invariants across every bonding curve.
- Exact, instant curve math. SquareRoot and Logarithmic curves compute in O(1) via closed-form antiderivatives instead of 100-step integration.
- Modern Bitcoin primitives. BIP 340 Schnorr (with batch verify), BIP 350 bech32m for Taproot, advanced RPC, and Tor-capable explorer clients with failover.
- Bring-your-own AI. Point the oracle at any OpenAI-, Anthropic-, or custom-JSON-compatible LLM endpoint.
- One-command deployment.
docker compose upfor the full stack, CI/CD workflows, a distroless image, and release scripts. - Quieter, safer internals. A real batch endpoint, a verified L1/L2 cache, a memory profiler, and a fixed potential zero-division in
MarketMakerService::generate_quote.
Tips
- Wrap hot paths in
MemoryGuard. It is RAII and zero-fuss — the allocation delta lands in yourtracingoutput on drop. Profile the order book and the bonding-curve math first. - Use Schnorr batch verification. When validating many signatures at once, the
schnorrmodule’s batch verify is meaningfully faster than verifying one at a time. - Bring your own LLM with
CustomEndpointClient. If you run a private or self-hosted model, register it viaCustomEndpointRegistryand keep your AI oracle off third-party APIs entirely. docker compose upfor a one-command stack. Add the optional bitcoind testnet profile when you want end-to-end Bitcoin flows locally.- Re-benchmark the curves. SquareRoot and Logarithmic pricing is now exact and O(1) — run
kaccy-core/benches/bonding_curves.rsto see the difference against the old numerical integration. - Run
./scripts/lint.shbefore you push. The pinnedrust-toolchain.tomlplus clippy/rustfmt mirrors CI, so green locally means green in Actions.
This is the platform, hardened
Kaccy remains what it has been since 0.1.0: a Bitcoin-native, self-custodial Personal Token Platform where professionals tokenize their expertise and reputation equals currency. 0.2.0 does not expand that promise — it makes it production-trustworthy. Complete docs, a deep test suite, exact math, modern Bitcoin cryptography, and a one-command deployment, all still entirely in safe Rust.
Repository: https://github.com/cool-japan/kaccy
Star the repo if you want a creator-economy protocol you can deploy, audit, and own — keys included.
Bitcoin-native, self-custodial value distribution, now hardened for production — your talent, your tokens, your keys.
— KitaSan at COOLJAPAN OÜ April 14, 2026