Skip to content

Case study · Web3

On-Chain Perps Trading Platform

An on-chain perps platform treated a wallet address as proof of identity, leaving its documented request-signing scheme unenforced on reads and a staging endpoint disclosing a live trading credential without authentication.

Findings · 10
1 Critical3 High3 Medium3 Low
FindingVulnerabilitySeverity
3.1An active, consumable API trading credential disclosed without authenticationA staging API endpoint returned a live credential object containing an active key value and its validity window.Critical
3.2A documented signature scheme not enforced on GET readsGET routes on the public API returned data with a syntactically malformed signature, a missing signature, and a garbage signature — all byte-identical.High
3.3Cross-environment wallet linkage unlocking production dataA 228-request walk across 57 testnet-active wallet addresses against production endpoints. Nine returned full private trading records — positions, history, and account state not exposed to the public production feed.High
3.4Affiliate financial relationships walkable without authenticationAnonymous graph traversal across the affiliate relationship structure. Per-node data included tier, volume, commission basis points, and earned fees.High
Anonymous listing of active API key material in productionKey material listed without authentication; masked but enumerableMedium
Service metrics exposition with live traffic telemetryVault service exposes metrics including live traffic dataMedium
Cross-environment wallet identity linkageThe mechanism enabling the high-severity finding aboveMedium
Referral code existence oracleDeterministic response distinguishing registered from unused codesLow
Forgeable pagination cursor enabling full-ledger enumerationCursor is base64 of block and log position; ~2,262 requests mirror a 1.13M-row ledgerLow
Validation-before-authentication orderingAccount-creation route validates the body before checking auth, unlike siblingsLow

Executive summary

What we were asked to do

An on-chain trading platform asked us to assess the estate around its trading front end. The platform is a self-deployed variant of an open-source derivatives interface, which means its architecture is public — a useful starting point for an attacker and a useful constraint for us.

Ten confirmed findings across 22 hosts. One critical, three high.

Principal findings

The platform uses a wallet address as the sole identity key across most of its read surface. Its documented request-signing scheme — an HMAC over a key, timestamp, and signature triple — is not enforced on a single GET read we tested. Garbage signatures return byte-identical successful responses with full data. The critical consequence: a staging API endpoint returns another account's active, consumable API trading credential, valid into next year, with no authentication. Beyond that, an affiliate relationship graph is walkable anonymously (726 addresses, 721 edges at four or more hops), fill-level commission data is returned despite a documented signature requirement, and — the finding with the most reaching consequence — nine of 57 testnet-active wallets return full private production trading data that production's own feed never exposes.

What this means in plain terms

Three things a board should take from this.

  • One design decision produced every finding. Treating a wallet address as proof of identity means anyone who knows an address can read that account's data. That is fine for a public blockchain explorer and wrong for a trading platform where the address is the credential. Every read finding in this report traces to that single choice.
  • The staging environment handed us a working production-adjacent credential. Not a hash, not a reference — an active API key valid into 2027. We did not replay it. Whether it works against production is the question the platform should answer before anything else in this report.
  • Testnet data is a map to production privacy. Nine of 57 wallets that were active on testnet return full private production trading data. Production's own public feed never exposes those accounts — but the testnet address list does. Environment separation is not just a data-hygiene issue; here it is a privacy leak in the other direction.

The five things that need a decision, not a patch

#What is wrongBusiness impactWho decides
1A staging endpoint returns a live API trading credential unauthenticatedThe key is valid into next year. Beyond revoking it, someone must determine whether it authenticates against production and whether that account has activity.Engineering leadership
2A documented signature scheme is unenforced on every GET readThe mutating routes correctly return 401 while reads return full data — so the boundary is implementable and the gap is a choice. Fixing it changes the public API contract, which is a versioning decision.API product owner
3Wallet address functions as the sole identity proofThis is the architectural root of every read finding. Changing it means introducing an ownership-proof mechanism, which affects integrators.Architecture + partnerships
4Affiliate financial relationships are walkable anonymouslyPartner commission structures and referral graphs are commercially sensitive. Whether they should be public is a business question, not only a security one.Partnerships + commercial
5Testnet-active wallets expose private production dataEnvironment separation failed in a direction nobody expects — testnet revealing production. Fixing it requires auditing how testnet and production share wallet identity.Platform engineering

What we did not get

We did not replay the disclosed credential. We did not achieve an authenticated session on any production surface. No funds moved. No write succeeded — every mutating route correctly returned 401, which is the positive finding that bounds the entire report.

We also did not exploit the forgery primitive beyond confirming it. The credential is disclosed; what it unlocks is the platform's question.

Engagement outcome

An authorized security assessment of an on-chain trading platform's estate identified ten vulnerabilities, including a critical unauthenticated disclosure of a live API trading credential on a staging host. The assessment also confirmed that a documented request-signing scheme was not enforced on read-only API routes. No credential was replayed, no funds moved, and all write routes were verified to require authentication; findings were disclosed under a confidentiality agreement.


1. The engagement in numbers

MetricValue
Root workstreams2
Total Swarm Size496
Hosts in scope22
Confirmed findings10 (1 critical, 3 high, 3 medium, 3 low)
Affiliate addresses walked726
Affiliate edges walked721
Maximum traversal depth4+ hops
Testnet wallets sampled57
Wallets returning production data9
Requests in the cross-environment walk228
Credential replayedNo

The 228-request walk is the number worth noting. The cross-environment finding was not a single probe — it was a systematic walk of 57 testnet-active addresses against production endpoints, with nine positive results. That is a measurement, not a sample.

Agent topology

RoleSessionsResponsibility
Recon300Estate mapping, API specification recovery, host-depth
Exploit160Credential discovery, graph traversal, oracle testing
Scout24Surface promotion
Orchestrator4Cycle design, merge
Advisor8Independent review
Fig 01 · Agent topology
Fig 01 · Agent topology

2. What held

The write plane held completely, and that is what bounds this report.

  • Every mutating route rejected unauthenticated calls with 401. The affiliate mutator family, the account-creation route's siblings, and the trade-submission paths all authenticated first. That is the contrast that proves the read gap is a choice rather than a limitation — the same codebase implements the check correctly one route over.
  • Signature verification is enforced on the body-signed write paths. Four routes that sign request bodies parsed unauthenticated input only to validation depth, then rejected at the signature stage.
  • No forged credential authenticated against any production surface. The disclosed key was identified; it was not replayed.
  • No cross-account write was achieved. Every attempt against a mutating route with a forged address returned 401.
Fig 02 · 2. What held
Fig 02 · 2. What held

The contrast is the single most useful thing in this report for the client. When one part of a codebase implements a control correctly and another part does not, the gap is not an oversight of capability — it is a decision that was made, deliberately or by drift. Naming that gives the fix an owner.


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 active, consumable API trading credential disclosed without authenticationCritical

In plain terms. A staging endpoint returned another account's active API trading credential — the actual key value, not a reference or a hash — with no authentication required. The key is valid into next year.

We did not replay it. The finding is the disclosure: a key that authenticates programmatic trading was readable by anyone who asked.

What. A staging API endpoint returned a live credential object containing an active key value and its validity window. The credential belongs to another account. No authentication was required.

How we found it. By reading the staging API's own specification and following the routes it documented. The route returned credential material rather than a masked reference.

The restraint is the substance: having found a live trading credential, the assessment stopped. Replaying it would have required authenticating as another user, which is a different authorisation than the one granted. That decision is recorded rather than glossed.

Root cause. A staging debug or convenience route returning full credential objects rather than masked references, deployed without authentication.

Fig 04 · 3.1 An active, consumable API trading credential disclosed without authentication
Fig 04 · 3.1 An active, consumable API trading credential disclosed without authentication

Impact. A live programmatic trading credential readable by anyone. Whether it authenticates against production was not tested — and that is the first thing the platform should establish.

Fix. Revoke the credential. Remove or authenticate the route. Audit every staging route that returns credential objects and confirm none of them returns unmasked values.

Kill chain. Reconnaissance through collection; the replay step was deliberately not taken.

Fig 05 · 3.1 An active, consumable API trading credential disclosed without authentication — Kill chain
Fig 05 · 3.1 An active, consumable API trading credential disclosed without authentication — Kill chain

3.2 A documented signature scheme not enforced on GET readsHigh

In plain terms. The API documents a request-signing scheme: an HMAC over an API key, a timestamp, and a signature. We tested it on every GET read we could enumerate and it is not enforced on any of them. Garbage signatures return successful responses with full data, byte-identical to a correctly signed request.

The mutating routes do enforce it. So the check exists in the codebase and works; it is simply absent on the read family.

What. GET routes on the public API returned data with a syntactically malformed signature, a missing signature, and a garbage signature — all byte-identical. The body-signed write routes parsed unauthenticated input to validation depth before rejecting at the signature stage, proving the verification logic exists.

How we found it. By comparing the two families rather than testing reads in isolation. The contrast between a mutator returning 401 and a read returning 200 with full data is what establishes the gap as an inconsistency rather than a policy.

Root cause. Signature verification applied to the mutating route family and not to the read family. Address-keyed reads are treated as public lookups.

Fig 06 · 3.2 A documented signature scheme not enforced on GET reads
Fig 06 · 3.2 A documented signature scheme not enforced on GET reads

Impact. Every read route documented as signature-protected is in fact public. This is the mechanism behind the affiliate and commission findings below.

Fix. Apply the mutators' authentication-first pattern to the read family. Version the API so integrators can migrate.


3.3 Cross-environment wallet linkage unlocking production dataHigh

In plain terms. We walked 57 wallets that were active on testnet against production endpoints. Nine returned full private production trading data — data that production's own public feed never exposes.

The direction is the surprising part. Testnet is normally the leak that exposes production infrastructure. Here the testnet address list is a directory of production accounts, and querying those addresses against production returns data the platform's own front end hides.

What. A 228-request walk across 57 testnet-active wallet addresses against production endpoints. Nine returned full private trading records — positions, history, and account state not exposed to the public production feed.

How we found it. By treating the two environments as one address namespace rather than two isolated systems. The testnet indexer and routing hosts both returned per-address data, so the address list was recoverable, and the production API accepted the same addresses as keys.

Root cause. Shared wallet identity between testnet and production, combined with production reads that are more permissive than the production front end's own feed.

Fig 07 · 3.3 Cross-environment wallet linkage unlocking production data
Fig 07 · 3.3 Cross-environment wallet linkage unlocking production data

Impact. Testnet activity identifies production accounts, and those accounts' private trading data is readable. Anyone monitoring testnet gains a map to production privacy.

Fix. Decouple testnet and production wallet identity, or apply per-address authorization on production reads so a known address is not sufficient.


3.4 Affiliate financial relationships walkable without authenticationHigh

In plain terms. The platform's affiliate programme has a referral graph. We walked it anonymously: 726 addresses connected by 721 edges at four or more hops, revealing per-account tiers, trading volumes, commission rates in basis points, and earned fees.

That is the partner economics of the platform, mapped.

What. Anonymous graph traversal across the affiliate relationship structure. Per-node data included tier, volume, commission basis points, and earned fees. A separate route returned fill-level commission rows despite documentation stating signature protection.

How we found it. By walking the graph rather than sampling it — starting from a known address and following referrals outward to four or more hops.

Root cause. Affiliate reads are address-keyed and unauthenticated, consistent with the platform-wide read family.

Fig 08 · 3.4 Affiliate financial relationships walkable without authentication
Fig 08 · 3.4 Affiliate financial relationships walkable without authentication

Impact. Commercially sensitive partner relationships and commission structures, publicly walkable.

Fix. Require authentication and bind affiliate reads to the caller's own relationship.


Also confirmed

FindingSeverityContent
Anonymous listing of active API key material in productionMediumKey material listed without authentication; masked but enumerable
Service metrics exposition with live traffic telemetryMediumVault service exposes metrics including live traffic data
Cross-environment wallet identity linkageMediumThe mechanism enabling the high-severity finding above
Referral code existence oracleLowDeterministic response distinguishing registered from unused codes
Forgeable pagination cursor enabling full-ledger enumerationLowCursor is base64 of block and log position; ~2,262 requests mirror a 1.13M-row ledger
Validation-before-authentication orderingLowAccount-creation route validates the body before checking auth, unlike siblings

4. Kill chain summary

Fig 09 · 4. Kill chain summary
Fig 09 · 4. Kill chain summary
ChainReachedTerminated atAccess obtained
Staging credentialStage 5 (collection)Not replayedKey value read
Signature-unenforced readsStage 5 (collection)Read boundaryFull GET data
Affiliate graphStage 5 (collection)4-hop traversalPartner economics
Cross-environmentStage 5 (collection)228-request walk9 production records
Cross-account writeStage 3 (delivery)401 on every routeNone

5. What the shape of this engagement teaches

"Wallet address is the identity" is a design decision with a long tail. It produced every read finding in this report — the affiliate graph, the commission rows, the cross-environment linkage, the preferences disclosure. Fixing them one at a time is patching symptoms. The architecture needs an ownership-proof mechanism before any of these stop being reachable.

The contrast between two route families is the finding. A mutator returning 401 and a read returning 200 with full data, in the same codebase, is not a capability gap. It is an inconsistency. Naming it that way gives the client a clear owner and a clear precedent to copy.

Testnet and production sharing an address namespace is a privacy leak in both directions. Usually the worry is testnet exposing production infrastructure. Here the testnet address list was a directory of production accounts whose private data production's own feed never shows. Auditing how environments share identity is worth doing before an assessment finds it.

Not replaying a live trading credential is the right call and should be stated. The finding is the disclosure. Replaying it would have authenticated as another user — a different authorisation than the engagement granted. That restraint is recorded in the finding, because a client reading "we found a live trading key" will immediately ask whether it works.

A 228-request walk is a measurement; a single probe is an anecdote. Nine of 57 wallets is a rate. That quantification is what makes the cross-environment finding actionable rather than a curiosity.

PriorityActionWhy firstEffort
1Revoke the disclosed credential and remove the staging routeA live trading key was publicVery low
1Establish whether that credential authenticates against productionThe client's own question, answerable in minutesLow
2Apply authentication to the GET read familyEvery documented-as-protected read is publicMedium
2Introduce an ownership-proof mechanism for address-keyed readsThe architectural root of every read findingLarge
2Bind affiliate reads to the caller's own relationshipPartner economics publicly walkableLow
3Decouple testnet and production wallet identityTestnet is a directory of production accountsMedium
3Protect pagination cursors with an HMACFull-ledger enumeration at ~2,262 requestsLow
3Require authentication before body validation on account creationUnauthenticated validation oracleVery low
4Review metrics exposition on the vault hostLive traffic telemetry exposedLow

Notices

Authorization

This was an authorized security assessment conducted under a written engagement agreement covering the production estate and its mirrored testnet surfaces.

Read-only discipline was applied throughout. The disclosed credential was not replayed — doing so would have required authenticating as another user, outside the grant. Every mutating route was tested only to the point of confirming its authentication requirement. The affiliate graph walk and the cross-environment sweep were both paced within the agreed rate.

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 and network ranges
  • All API key values, credential identifiers, and validity windows
  • All wallet addresses, referral codes, and account identifiers
  • The organisation and brand identifiers, including the platform name
  • The upstream open-source project the front end derives from
  • Endpoint paths, route names, and parameter names
  • Individual affiliate balances, volumes, commission rates, and earned fees
  • The nine production wallets identified in the cross-environment walk
  • Exact calendar dates and clock times
  • The specific traversal depth and per-hop node counts

What was kept, deliberately: vulnerability classes and CWE identifiers, the architectural root cause (wallet address as identity), the route-family contrast that proves the signature gap is an inconsistency, the aggregate graph size, the cross-environment hit rate, and the credential-disclosure restraint. These are transferable and identify nobody.

Placeholders used throughout:

PlaceholderMeaning
platform.exampleTrading platform domain and estate
api.platform.examplePublic trading API
staging.api.platform.exampleStaging API
testnet.api.platform.exampleTestnet-mirrored API
vaults.platform.exampleVault service
<redacted>Any key, address, code, identifier, or value

Data handling

No financial data is reproduced. The affiliate graph is described by aggregate address and edge counts, never by address or per-account economics. The cross-environment finding is described by hit rate, never by the wallets involved. No API key value appears. No trading position, volume, or fee figure appears.

Disclaimer

Findings reflect the state of the tested systems during the engagement window. Security posture changes; a finding here does not imply the condition persists today.

The critical finding is a disclosure, not a compromise. The credential was not replayed. Whether it authenticates against a production surface is stated as an open question for the client, not as an assertion in either direction.

The cross-environment finding rests on a walk of 57 wallets, not the full testnet population. Nine positives is a rate, not a census. The direction of the walk — testnet addresses queried against production — is the finding; the full extent is unmeasured.


Methodology and tooling by BlackBit. Findings bounded by explicit restraint on credential replay; route-family contrasts used to distinguish inconsistency from capability gaps. Published with the client's permission.

More in Web3

← All case studies