Executive summary
What we were asked to do
A layer-1 chain with its own stablecoin asked us to attack the whole system: the smart contracts holding user funds, the validator infrastructure running the network, the swap interface quoting prices, and the web estate around it. Six crown-jewel classes were in scope, including fund loss.
This is the broadest single engagement in our published set — it touches contracts, chain protocol, and application layer in one report.
Principal findings
Eight rated findings are described: one critical, five high and two medium. The critical: an upgradeable aggregator contract owned by a single externally-owned account holding three unlimited token approvals. One compromised key replaces the contract logic and drains everything approved to it. We measured the floor of that exposure: ~43,700 units of the pegged asset across roughly 1,000 funded accounts and ~1,050 unlimited approval pairs. Two more contracts have the same single-key ownership pattern, covering 106 and ~800 units of the pegged asset of standing approvals respectively. Beyond the contracts: the chain's peer-to-peer port is exposed directly to the internet, bypassing the CDN entirely; the token trades ~38 times below its own peg in a pool with ~400 units of the pegged asset of liquidity while the quote API serves that rate without a sanity check; and one entity controls 99.99% of the voting power with 100% of genesis supply, having accrued ~8,500 units of the pegged asset in rewards.
What this means in plain terms
Three things a board should take from this.
- The money is behind a single key, three times over. Three separate contracts holding user approvals are each owned by one externally-owned account rather than a multisig or a timelock. That means one phished key, one leaked environment variable, one compromised laptop drains all of it. This is not a code bug — it is a custody architecture decision, and it is the most consequential thing in the report.
- The price your own interface quotes is 38× wrong. The token trades far below its peg in a shallow pool, and the swap API serves that rate to users and integrators with no sanity bound. Anyone can move that price with a small swap because the pool has ~400 units of the pegged asset of active liquidity. The interface is honestly reporting a manipulable number.
- The network's peer-to-peer layer is reachable directly. The chain's consensus gossip port answers on the public internet, not just behind the CDN. That is a different risk class from a web finding: it exposes the network layer itself, and the assessed worst case includes node isolation or a P2P-layer denial of service.
The five things that need a decision, not a patch
| # | What is wrong | Business impact | Who decides |
|---|---|---|---|
| 1 | Three contracts holding unlimited user approvals are each owned by a single key | This is custody architecture. Moving to a multisig or a timelock is a governance and operational decision, not a code change — and until it happens, the entire approved balance rests on one credential. | Executive + treasury + governance |
| 2 | The token quotes 38× below peg with no sanity bound in the interface | Users and integrators are acting on a number anyone can move with a small swap in a pool of roughly 400 units. Someone must decide whether the interface should refuse to quote outside a band. | Product + risk |
| 3 | The peer-to-peer port is publicly reachable | Consensus gossip on the open internet exposes the network layer to denial-of-service and node isolation. Whether that is intentional (permissionless network) or an oversight needs an explicit answer. | Infrastructure + protocol |
| 4 | One entity holds 99.99% of voting power and 100% of genesis supply | This is a decentralisation claim that the chain state does not support. If it is a launch-phase arrangement, that should be stated. If it is not, the governance model needs rework. | Governance + communications |
| 5 | The quote API crashes on type-invalid input with a deterministic 502 | Field-selective validation means some parameters are checked and others reach the engine. The crash is per-request, not cross-user, but it is an input-handling gap worth closing. | API engineering |
What we did not get
We did not execute a drain. No owner invocation was performed on any contract — the critical finding is a proven capability, not a demonstrated theft. No validator was attacked. No funds moved.
One qualification on the critical: the score of 9.0 reflects the key-compromise path. Exploiting it requires obtaining one externally-owned account key, which is high complexity — but once held, no further platform privilege is needed and the impact is total.
Engagement outcome
An authorized security assessment of a Cosmos-based chain and its stablecoin identified nine vulnerabilities, including a critical single-key ownership pattern across three contracts holding user token approvals with a measured drain floor of approximately 43,700 units of the pegged asset. Also confirmed were a publicly reachable consensus peer-to-peer port and a stablecoin quoting roughly 38 times below its peg through the platform's own interface. No funds were moved and no contract owner action was taken; all findings were disclosed under a confidentiality agreement with remediation guidance.
1. The engagement in numbers
| Metric | Value |
|---|---|
| Root workstreams | 4 |
| Total Swarm Size | 451 |
| Distinct agent roles | 6 |
| Contracts analysed | 4 (aggregator, settler, executor, token) |
| Rated findings described in section 3 | 8 (1 critical, 5 high, 2 medium) |
| Unlimited approval pairs measured | ~1,050 |
| Funded accounts in drain floor | ~1,000 |
| Measured single-call drain floor | ~43,700 units of the pegged asset |
| Genesis supply concentration | 100% in two non-vested wallets |
| Voting power concentration | ~99.99% in one entity |
| Funds moved | None |
The approval-pair measurement is the number worth understanding. Rather than reporting "unlimited approvals exist," the assessment enumerated every owner-to-spender pair with an unlimited allowance, counted the funded accounts among them, and computed what a single drain call would actually realise. That converts a qualitative finding into a quantified one.
Agent topology
| Role | Sessions | Responsibility |
|---|---|---|
| Recon | 280 | Chain mapping, contract inventory, host-depth |
| Exploit | 120 | Contract analysis, approval measurement, quote testing |
| Scout | 30 | Surface promotion |
| Advisor | 12 | Independent review |
| Orchestrator | 6 | Wave design, merge |
| Verification | 3 | Independent re-check |
2. What held
Several controls were confirmed working, and they bound the critical finding's exploitation path.
- Contract facets other than the owner path held. The analysis identified the owner-key path as the exposure and confirmed no non-owner could invoke the destructive functions. The aggregator's facet-routing logic was correctly implemented; the risk is who holds the admin role.
- The quote API's type validation is field-selective rather than absent. Some parameters are checked. The finding is that certain fields reach the pricing engine unchecked — not that validation is missing entirely.
- Approval accounting is accurate. The measured drain floor reflects real on-chain state: the assessment counted ~1,050 unlimited pairs and ~1,000 funded accounts, and reconciled the units of the pegged asset balance those approvals actually cover.
- No cross-user state corruption from the quote crashes. The deterministic 502s are per-request and do not affect other users' sessions or quotes.
3. The findings that mattered
How the estate was mapped
3.1 An upgradeable aggregator owned by a single key over unlimited approvalsCritical, CVSS 9.0
In plain terms. The chain runs an upgradeable aggregator contract. "Upgradeable" means the owner can replace its logic at any time. The owner is one externally-owned account — not a multisig, not a timelock, one key.
Three parties have granted that contract unlimited token approval. So whoever holds the owner key can swap in malicious logic and drain everything those three approvals cover.
We measured what that would realise if executed: ~43,700 units of the pegged asset across roughly 1,000 funded accounts and ~1,050 unlimited owner-to-spender pairs. That is the floor, not the ceiling — it is what the current approval state would yield in a single call.
What. An upgradeable contract with a single externally-owned account as owner, holding three MaxUint256 approvals. The destructive owner invocation was not performed — the finding is the capability and the measured exposure.
How we found it. By reading ownership from chain state and then quantifying the exposure rather than asserting it.
The sequence matters:
- Resolve the contract's ownership from chain state — not from documentation.
- Enumerate every owner-to-spender approval pair with an unlimited allowance: ~1,050 of them.
- Among those, identify which owners actually hold balances: roughly 1,000 funded accounts.
- Sum the units of the pegged asset those approvals cover: ~43,700.
That fourth step is what turns "unlimited approvals exist" into "here is the number a single call would realise." A finding without that number is a worry; with it, it is a budget line.
Root cause. Custody architecture, not a code defect. An upgradeable contract needs an admin; that admin is a single key rather than a threshold or a delay.
Impact. One compromised key drains every approved balance. The measured floor is ~43,700 units of the pegged asset. Two further contracts share the same pattern — a settlement contract owned by a single key routing transfers for 106 approvers, and a swap executor with owner-only emergency withdrawal holding a standing unlimited approval over ~800 units of the pegged asset.
Fix. Move ownership to a multisig with a threshold, or to a timelock so a hostile upgrade is observable before it executes. Apply the same change to all three contracts.
Kill chain. Stage four reached conceptually; the owner invocation was not executed.
3.2 Consensus peer-to-peer port exposed directly to the internetHigh, CVSS 8.2
In plain terms. The chain's consensus gossip protocol accepts connections on two ports directly from the internet, not just through the CDN that fronts the web estate. We connected, identified the protocol, and stopped there.
This is a different class from a web finding. It exposes the network layer — where nodes talk to each other — to anyone who can open a socket.
What. Two peer-to-peer ports on the origin host accepted external connections. Protocol identification confirmed the consensus gossip layer. No P2P-layer attack was attempted.
How we found it. Port scanning the origin host discovered outside the CDN path. The chain's web estate sits behind a CDN; the P2P ports do not.
Root cause. The origin server's network policy permits inbound P2P from the internet. Whether that is intentional for a permissionless network or an oversight is a deployment decision that should be documented either way.
Impact. Reachability is proven. The assessed worst case is P2P-layer denial of service or node isolation. Confidentiality beyond existing gossip exposure is not claimed, and integrity impact — transaction or gossip injection — is possible but untested.
Fix. Decide explicitly whether public P2P is intended. If not, firewall it to known peers.
3.3 Stablecoin quoting 38 times below its own peg with no sanity boundHigh, CVSS 8.6
In plain terms. The chain's stablecoin trades at roughly 0.026 units of the pegged asset against a target of 1.00 — about 38 times below peg. The pool that sets that price holds only ~400 units of the pegged asset of active-range liquidity, so anyone can move the tick with an ordinary swap and small capital.
The platform's own quote API serves that rate to users and integrators without any sanity check. The interface is honestly reporting a manipulable number.
What. A Uniswap-style pool with ~400 units of the pegged asset of active liquidity was quoting the stablecoin at ~0.026 against its peg. The quote endpoint returns this rate with no bounds check. A sister pool shows the same condition.
How we found it. By comparing the on-chain pool state against the token's stated peg, then confirming the quote API served the same rate publicly.
Root cause. A shallow pool plus an interface with no price-sanity bound. Either alone is defensible; together they present an attacker-movable price as authoritative.
Impact. Any integrator or user acting on the quote is acting on a manipulable number. Moving the tick requires only an ordinary swap with small capital.
Fix. Add a sanity band to the quote API, or refuse to quote when the pool's deviation from peg exceeds a threshold.
3.4 One entity holds 99.99% of voting power and 100% of genesis supplyHigh, CVSS 8.7
In plain terms. The chain's genesis allocation put 100% of supply into two non-vested wallets. One entity now controls approximately 99.99% of Cosmos voting power and has accrued about ~8,500 units of the pegged asset in rewards — more than nine times the lifetime commissions of all eleven validators combined.
This is a decentralisation claim that the chain state does not support.
What. Genesis allocation decoded from the published genesis archive — which checksum-matched its documented hash — showed 100% of supply in two non-vested multisig wallets. Chain-state analysis then established ~99.99% voting-power concentration in one entity and ~8,500 units of the pegged asset of accrued rewards.
The assessment followed the whale off-chain too: zero on-chain units of the pegged asset balance at the address on this chain, but ~1.19 million of a major stablecoin on Ethereum mainnet at the same address, verified by a direct balance call.
How we found it. By decoding the genesis archive and reconciling it against live governance and distribution state. The checksum match is what makes the genesis analysis authoritative rather than speculative.
Root cause. Launch allocation concentrated in two wallets with no vesting, combined with a staking distribution that funnels rewards to the dominant holder.
Impact. The governance model is nominal. One entity can exercise governance and fee-routing power unilaterally with ordinary chain calls.
Fix. If this is a launch-phase arrangement, state it. If it is not, the allocation and reward distribution need rework.
Also confirmed
| Finding | Severity | Content |
|---|---|---|
| Settlement contract with single-key owner routing transfers for 106 approvers | High 8.1 | Same ownership pattern as the critical |
| Swap executor with owner-only emergency withdrawal over ~800 units of the pegged asset standing approval | High 8.1 | Third instance of the single-key pattern; non-owner revert verified live |
| Quote API accepts type-invalid slippage tolerance | Medium 5.3 | Field-selective validation; impact limited to the requester's own quote |
| Quote API crashes on type-invalid deadline and gas strategy values | Medium 6.5 | Deterministic 502 per request; no cross-user corruption |
4. Kill chain summary
| Chain | Reached | Terminated at | Funds at risk |
|---|---|---|---|
| Aggregator ownership | Stage 4 (exploit, conceptual) | Owner key not obtained | ~43,700 units of the pegged asset |
| Settlement ownership | Stage 4 (exploit, conceptual) | Owner key not obtained | 106 approvers' balances |
| Executor ownership | Stage 4 (exploit, conceptual) | Owner key not obtained | ~800 units of the pegged asset |
| P2P exposure | Stage 2 (weaponize) | Reachability only | None |
| Off-peg quote | Stage 5 (collection) | Rate confirmed, not exploited | None |
5. What the shape of this engagement teaches
Quantifying exposure turns a worry into a budget line. "Unlimited approvals exist" is a common finding that clients discount. "~1,050 pairs, ~1,000 funded accounts, ~43,700 units of the pegged asset realisable in one call" is a number a treasury team can act on. The enumeration work is unglamorous and it is what makes the finding land.
Single-key ownership of an upgradeable contract is a category error, and it recurs. Three separate contracts in one estate shared the pattern. That is not three bugs — it is a development convention. The remediation is architectural: a multisig and a timelock, applied consistently.
Chain-level findings need chain-level evidence. The genesis archive was decoded only after its checksum matched the documented hash. That is what makes "100% of supply in two wallets" authoritative rather than a rumour. And following the whale off-chain — zero balance here, 1.19 million on another chain at the same address — is the kind of correlation that only a broad engagement produces.
An interface honestly reporting a manipulable number is still a problem. The quote API is not lying. It is faithfully serving a rate that anyone can move with a small swap. The absence of a sanity bound is the finding, and the fix is a band, not a rewrite.
P2P exposure is not a web finding and should not be scored as one. Exposing consensus gossip to the internet is a network-layer decision with network-layer consequences. Treating it as a subcategory of "open port" understates what node isolation or gossip disruption means for a live chain.
Recommended sequence
| Priority | Action | Why first | Effort |
|---|---|---|---|
| 1 | Move all three contract owners to a multisig with a threshold | ~43,700 units of the pegged asset plus two more contracts rest on single keys | Medium |
| 1 | Add a timelock to contract upgrades | Makes a hostile upgrade observable before execution | Medium |
| 2 | Add a sanity band to the quote API | Users act on a rate anyone can move | Low |
| 2 | Decide and document whether public P2P is intended | The consensus layer is internet-reachable | Decision |
| 3 | State the genesis allocation and voting concentration publicly | The governance claim does not match chain state | Communications |
| 3 | Tighten quote API validation to all fields | Type-invalid values reach the pricing engine | Low |
| 4 | Deepen the stablecoin pool or wind it down | ~400 units of the pegged asset of liquidity cannot hold a peg | Product |
Notices
Authorization
This was an authorized security assessment conducted under a written engagement agreement covering the chain, its contracts, and its web estate.
Read-only discipline was applied to all contract analysis. No owner invocation was performed on any contract — the destructive function was identified and its exposure quantified, not executed. No peer-to-peer attack was attempted beyond connecting and identifying the protocol. No governance action was taken. No validator was attacked and no funds were moved.
Redaction
Every hostname, IP address, credential, address, and identifier in this document has been replaced with a placeholder or generalised. The organisation is not identified, and no detail here would allow a reader to determine the client, locate the systems, or reproduce the access.
What was removed:
- All hostnames, subdomains, and domain names
- All IP addresses, network ranges, and hosting provider identities
- All contract addresses, wallet addresses, and transaction hashes
- The chain identifier and network name
- Organisation and brand identifiers, including the token and chain names
- The specific port numbers
- The pool addresses and the specific exchange protocol
- Individual approver addresses and balance figures
- The genesis archive URL and checksum
- Exact calendar dates and clock times
- The specific rewards and commission figures for individual validators
What was kept, deliberately: vulnerability classes and CWE identifiers, CVSS vectors with written rationale, the ownership pattern (single externally-owned account on an upgradeable contract), the measurement methodology for the drain floor, and the aggregate figures as orders of magnitude rather than point values. These are transferable and identify nobody.
Placeholders used throughout:
| Placeholder | Meaning |
|---|---|
chain.example | The layer-1 chain and its web estate |
aggregator | The upgradeable aggregator contract |
settler | The settlement contract |
executor | The swap executor contract |
pegged-token | The pegged stablecoin |
quote-api | The swap quote endpoint |
<redacted> | Any address, key, hash, chain identifier, or value |
Data handling
No user financial data is reproduced. Approval counts and the drain floor are aggregates. The two largest approvers are described by count, not by address or balance. The genesis whale is described by concentration percentage and cross-chain balance as an order of magnitude — never by address. No contract address, wallet address, or transaction hash appears.
Disclaimer
Findings reflect the state of the tested systems during the engagement window. Chain state and contract ownership change; a finding here does not imply the condition persists today.
The critical finding is a capability, not an executed theft. The aggregator's owner invocation was never performed. The CVSS score of 9.0 reflects the key-compromise path — high complexity to obtain one externally-owned account key, total impact once held.
The P2P finding is reachability and protocol identification only. No P2P-layer attack was attempted. The availability impact in the score is an assessed worst case, not an observed outcome.
Methodology and tooling by BlackBit. Contract findings quantified against on-chain state rather than asserted; genesis allocation verified against its documented checksum. Published with the client's permission.
More in Web3
- Open-Source Cryptocurrency Reference Full-Node Client
- Cross-Chain Intent Bridge and Relayer Protocol
- Crypto Fundamentals and On-Chain Analytics Platform
- Cryptocurrency Market Data Aggregator and Price-Tracking Platform
- Simulated Crypto Trading and Market Competition Platform
- Decentralised Asset Management and DAO Governance Protocol
- View all 33 Web3 case studies