Overview
How Account Demolisher is built, what runs where, and where to find the detail.
Account Demolisher is a Next.js application that closes Stellar accounts. It runs almost entirely in the browser: discovery, plan generation, simulation, the allow-list check, the safety gates, and signing all happen client-side.
The server exists for three narrow jobs, none of which involve your key.
What runs where
| Runs in the browser | Runs on the server |
|---|---|
| Reading the account from Horizon | Co-signing the mediator forward |
| Discovering DeFi positions on chain | Holding a multisig signing request in memory |
| Generating and validating the plan | Proxying the Soroswap aggregator |
| Simulating every Soroban node | |
| Enforcing the contract allow-list | |
| Signing and submitting transactions |
Position discovery has no server-side proxy and needs no API key. Blend, Soroswap, and FxDAO are read directly from their contracts. Aquarius is the one protocol read through a REST API, and its on-chain event scan runs alongside as a second source.
Start here
Architecture
The module map, the request flow, and the trust boundaries.
Closure lifecycle
Audit, plan, simulate, execute, and what each stage guarantees.
How it works
Account audit
What is read from Horizon and how the merge verdict is computed.
Position discovery
Per-protocol discovery and exit construction.
The plan graph
Node kinds, dependency edges, validation, and ordering.
The classic batch
The nine operation phases and how they split across transactions.
Simulation
What is simulated, what is baked into the envelope, and what is not.
Execution and recovery
The topological walk, retry rules, and the merge guard.
Protocol
Mediator forward
Per-flow key derivation and the single envelope shape the server co-signs.
Signing relay API
Routes, guards, and signature merging for multisig closes.
SEP-41 allowances
The event scan, on-chain confirmation, and the revoke call.
Exchange integration
For exchange operators: the registry, memos, and what you receive.
Wallet integration
For wallet developers: the SEP-43 surface the app uses.
SEP support
Which Stellar Ecosystem Proposals this implements.
Security and reference
Security model
Assets, adversaries, trust boundaries, and the code that defends each.
Contract allow-list
The compiled-in contract set and how it is enforced.
Configuration
Every environment variable, its default, and its effect.
Networks
Horizon, RPC, passphrase, and friendbot per network.
Failure reference
The failure taxonomy and the error types raised across the codebase.
Self-hosting
Install, configure, run, and deploy under your own domain.
Source
github.com/bytemaster333/account-demolisher, Apache 2.0.