Skip to content

Case study · Web3

Cosmos L1 Stablecoin Chain

A Cosmos L1 stablecoin chain's upgradeable contracts were each owned by a single key holding unlimited approvals — a measured $43,700 single-call drain floor — while one entity held 99.99% of voting power.

Findings · 8
1 Critical5 High2 Medium
FindingVulnerabilitySeverity
3.1An upgradeable aggregator owned by a single key over unlimited approvalsAn upgradeable contract with a single externally-owned account as owner, holding three MaxUint256 approvals.CriticalCVSS 9.0
3.2Consensus peer-to-peer port exposed directly to the internetTwo peer-to-peer ports on the origin host accepted external connections. Protocol identification confirmed the consensus gossip layer.HighCVSS 8.2
3.3Stablecoin quoting 38 times below its own peg with no sanity boundA Uniswap-style pool with ~400 units of the pegged asset of active liquidity was quoting the stablecoin at ~0.026 against its peg.HighCVSS 8.6
3.4One entity holds 99.99% of voting power and 100% of genesis supplyGenesis allocation decoded from the published genesis archive — which checksum-matched its documented hash — showed 100% of supply in two non-vested multisig wallets.HighCVSS 8.7
Settlement contract with single-key owner routing transfers for 106 approversSame ownership pattern as the criticalHighCVSS 8.1
Swap executor with owner-only emergency withdrawal over ~800 units of the pegged asset standing approvalThird instance of the single-key pattern; non-owner revert verified liveHighCVSS 8.1
Quote API accepts type-invalid slippage toleranceField-selective validation; impact limited to the requester's own quoteMediumCVSS 5.3
Quote API crashes on type-invalid deadline and gas strategy valuesDeterministic 502 per request; no cross-user corruptionMediumCVSS 6.5

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 wrongBusiness impactWho decides
1Three contracts holding unlimited user approvals are each owned by a single keyThis 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
2The token quotes 38× below peg with no sanity bound in the interfaceUsers 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
3The peer-to-peer port is publicly reachableConsensus 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
4One entity holds 99.99% of voting power and 100% of genesis supplyThis 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
5The quote API crashes on type-invalid input with a deterministic 502Field-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

MetricValue
Root workstreams4
Total Swarm Size451
Distinct agent roles6
Contracts analysed4 (aggregator, settler, executor, token)
Rated findings described in section 38 (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 concentration100% in two non-vested wallets
Voting power concentration~99.99% in one entity
Funds movedNone

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

RoleSessionsResponsibility
Recon280Chain mapping, contract inventory, host-depth
Exploit120Contract analysis, approval measurement, quote testing
Scout30Surface promotion
Advisor12Independent review
Orchestrator6Wave design, merge
Verification3Independent re-check
Fig 01 · Agent topology
Fig 01 · Agent topology

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.
Fig 02 · 2. What held
Fig 02 · 2. What held

3. The findings that mattered

How the estate was mapped

Fig 03 · How the estate was mapped
Fig 03 · 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:

  1. Resolve the contract's ownership from chain state — not from documentation.
  2. Enumerate every owner-to-spender approval pair with an unlimited allowance: ~1,050 of them.
  3. Among those, identify which owners actually hold balances: roughly 1,000 funded accounts.
  4. 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.

Fig 04 · 3.1 An upgradeable aggregator owned by a single key over unlimited approvals
Fig 04 · 3.1 An upgradeable aggregator owned by a single key over unlimited approvals

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.

Fig 05 · 3.1 An upgradeable aggregator owned by a single key over unlimited approvals — Kill chain
Fig 05 · 3.1 An upgradeable aggregator owned by a single key over unlimited approvals — Kill chain

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.

Fig 06 · 3.2 Consensus peer-to-peer port exposed directly to the internet
Fig 06 · 3.2 Consensus peer-to-peer port exposed directly to the internet

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.

Fig 07 · 3.3 Stablecoin quoting 38 times below its own peg with no sanity bound
Fig 07 · 3.3 Stablecoin quoting 38 times below its own peg with no sanity bound

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.

Fig 08 · 3.4 One entity holds 99.99% of voting power and 100% of genesis supply
Fig 08 · 3.4 One entity holds 99.99% of voting power and 100% of genesis supply

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

FindingSeverityContent
Settlement contract with single-key owner routing transfers for 106 approversHigh 8.1Same ownership pattern as the critical
Swap executor with owner-only emergency withdrawal over ~800 units of the pegged asset standing approvalHigh 8.1Third instance of the single-key pattern; non-owner revert verified live
Quote API accepts type-invalid slippage toleranceMedium 5.3Field-selective validation; impact limited to the requester's own quote
Quote API crashes on type-invalid deadline and gas strategy valuesMedium 6.5Deterministic 502 per request; no cross-user corruption

4. Kill chain summary

Fig 09 · 4. Kill chain summary
Fig 09 · 4. Kill chain summary
ChainReachedTerminated atFunds at risk
Aggregator ownershipStage 4 (exploit, conceptual)Owner key not obtained~43,700 units of the pegged asset
Settlement ownershipStage 4 (exploit, conceptual)Owner key not obtained106 approvers' balances
Executor ownershipStage 4 (exploit, conceptual)Owner key not obtained~800 units of the pegged asset
P2P exposureStage 2 (weaponize)Reachability onlyNone
Off-peg quoteStage 5 (collection)Rate confirmed, not exploitedNone

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.

PriorityActionWhy firstEffort
1Move all three contract owners to a multisig with a threshold~43,700 units of the pegged asset plus two more contracts rest on single keysMedium
1Add a timelock to contract upgradesMakes a hostile upgrade observable before executionMedium
2Add a sanity band to the quote APIUsers act on a rate anyone can moveLow
2Decide and document whether public P2P is intendedThe consensus layer is internet-reachableDecision
3State the genesis allocation and voting concentration publiclyThe governance claim does not match chain stateCommunications
3Tighten quote API validation to all fieldsType-invalid values reach the pricing engineLow
4Deepen the stablecoin pool or wind it down~400 units of the pegged asset of liquidity cannot hold a pegProduct

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:

PlaceholderMeaning
chain.exampleThe layer-1 chain and its web estate
aggregatorThe upgradeable aggregator contract
settlerThe settlement contract
executorThe swap executor contract
pegged-tokenThe pegged stablecoin
quote-apiThe 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

← All case studies