[Case Study] CryptoTrade.gg - Design and Trade-offs of an On-Chain Trading History Service
A technical case study of CryptoTrade.gg, the on-chain trading history lookup service Toris built: problem definition, technical design, and the community feedback loop.
Joohwan Yu · Founder, Full Stack Developer
Toris · Published
Contents
Q. How did you show trading records from a single wallet address in a trustworthy way? Without running our own node, we used external APIs, caching, and per-chain normalization adapters to convert on-chain records into a common trade model and visualize them.
Product name: CryptoTrade.gg Development period: 2025.02 – 2025.04 (about 2 months) Tech stack: TypeScript, Next.js, Chart.js, Recharts Positioning: A service for looking up and visualizing trading history by wallet address
CryptoTrade.gg is an on-chain data product that Toris designed, built, and operated. Just as a game stats lookup service shows a player’s record as objective data, the goal was to let anyone look up and visualize a trader’s on-chain activity from a single wallet address. This post records the technical decisions made along the way and how user feedback changed the product.
Summary of Key Decisions
| Decision | Choice | Trade-off |
|---|---|---|
| Data source | External data API + caching layer | Accept rate limits and external dependency to eliminate node operating costs |
| Data normalization | Per-chain adapters → common trade model | Upfront design cost; minimizes the scope of changes when adding chains |
| Chart rendering | Sampled trend charts + paginated lists | Give up some point precision in the trend view to stay responsive |
| Data freshness | Periodic background refresh + manual refresh | Give up second-level real-time updates; defer WebSocket infrastructure |
| Gas fee aggregation | Let users choose whether to include it | Give up the simplicity of a single standard; sidestep the accounting debate |
1. Problem Definition and Product Hypothesis
The crypto community has a structural information asymmetry. Traders share their performance in the community, but third parties have no good way to verify those claims. Screenshots are easy to fake, and exchange histories are private. On-chain transaction records, on the other hand, are public data anyone can view, yet there were few tools that turn raw transactions into a human-readable “track record.”
From this, I formed a product hypothesis.
“If we turn facts recorded on the blockchain, rather than a trader’s claims (screenshots), into a lookup screen, the community’s cost of verification goes down.”
There were two target user groups. First, community members who want to check another trader’s real performance. Second, traders themselves who want to review their own trade history objectively. As an important principle, this service does not recommend any particular asset or trade. We drew a clear boundary for the product as a lookup tool that makes already-public data easy to read.
2. Constraints
The fact that this was a two-month project for a one-person studio governed every design decision.
- Infrastructure budget: We couldn’t afford to run our own blockchain node. Running a node demands ongoing server costs and management effort, which was excessive investment for a product still in the validation stage.
- Multichain requirement: Chains like Ethereum and BSC each have different address formats, data structures, and APIs. We couldn’t support every chain from the start.
- Data volume: A single active wallet has thousands of trades. Rendering them all in the browser as-is would wreck usability.
- Data freshness: The blockchain keeps updating, so the data at lookup time becomes stale right away.
3. Technical Design and Trade-offs
3.1 Stack choice: Next.js + TypeScript
I chose Next.js so I could handle the frontend and the data lookup layer in one codebase. Wrapping external data sources in API routes lets us avoid exposing API keys to the client and cache responses on the server side. TypeScript was a necessity, not a choice. In code that deals with a different transaction schema for each chain, type definitions served as living documentation of the data structures.
3.2 Data collection: external API + caching instead of our own node
The first big trade-off was the data source. There were three options.
| Option | Pros | Cons |
|---|---|---|
| Run our own node | Unlimited queries, full control | Server costs, operational burden, unsuited to a 2-month schedule |
| External data API | Start right away, cleaned data | Rate limits, external dependency |
| Hybrid | Flexible | Too much upfront complexity |
I chose the external API and offset the rate-limit downside with a caching layer. Repeated lookups for the same wallet are answered from the cache, and fetches from the source are tied to a periodic refresh schedule. There’s a view that “you have to run your own node to be real Web3,” but our judgment was that for a product in the validation stage, infrastructure only needs to be the minimum required to test the hypothesis.
// Data lookup layer: wraps the external source and normalizes it
const fetchTradeHistory = async (walletAddress: string) => {
const response = await fetch(
`https://api.example.com/trades?address=${walletAddress}`
);
const data = await response.json();
return processTradeData(data); // Per-chain raw data → common trade model
};
The key is in processTradeData. Thanks to this layer, which normalizes each chain’s raw response into a common trade model, the visualization code doesn’t need to know which chain the data comes from. When we add a chain later, the scope of changes is limited to this one adapter.
3.3 Input validation: the first gate at the trust boundary
The wallet address is this service’s only user input and the trigger for external API calls. Calling the external API with a bad address wastes the request quota, and a vague failure leads users to leave. So I did validation on the client side first.
// Per-chain address format validation — fail early before any external request
const isValidAddress = (address: string, chain: string): boolean => {
if (chain === 'ethereum') {
return /^0x[a-fA-F0-9]{40}$/.test(address);
}
// Extension point for per-chain validation logic
return false;
};
Because each chain has a different address format, validation also branches per chain, and checksum validation reduced lookups of “an address that exists but wasn’t intended” caused by typos. When validation fails, instead of “Invalid address,” we gave an error message saying which chain’s format it doesn’t match. This is where I learned that input validation is a security measure and also UX design.
3.4 Visualization and rendering performance
I built four views with Chart.js and Recharts: profit/loss trend, trading volume, win-rate statistics, and trading patterns by time of day. The second trade-off came up here: accuracy versus responsiveness.
If you draw every data point on a chart for a wallet with thousands of trades, rendering becomes noticeably slow. I combined three techniques.
- Chart sampling: Trend charts show only sampled data. For a chart meant for reading trends, I judged the precision of individual points to be a lower priority.
- Pagination: The detailed trade list loads in pages. Here accuracy comes first, so we don’t sample.
- Virtual scrolling: Limits the number of DOM nodes in a long list to what’s visible on screen.
Even with the same data, the “screen for seeing trends” and the “screen for checking individual records” have different needs. A visualization performance problem turned out to be a matter of defining the screen’s purpose.
3.5 Data freshness strategy
On real-time updates, I deliberately made a conservative choice. I considered WebSocket-based real-time streaming, but looking up trading history isn’t a use case where second-level real-time updates are essential. Instead, I designed two tiers.
- Periodic background refresh: Keep the data close to current through scheduled updates
- Manual refresh: Let users trigger an update themselves when they want data as of “right now”
WebSocket was left to be introduced once a real-time need is proven. Not building real-time infrastructure before the need is proven is also a design decision.
4. Validation with Users and the Community
For this to be a tool traders actually use rather than one that’s built and left alone, the community’s sense of accounting had to match the product’s calculation logic. Early users and community feedback surfaced three points that needed adjusting.
4.1 “This return calculation differs from mine” — the gas fee debate
The hottest feedback was about how to treat gas fees in profit and loss calculations. Traders had different accounting methods. One view held that gas fees should be included as a cost to see “real profit,” and another held that the performance of the trade itself should be separated from network costs.
If we forced one side to be the right answer, the product would become “a service that calculates wrong” for users on the other side. The conclusion was to hand the judgment back to the user instead of making it in the product. We showed gas fees as a separate line item and let users choose whether to include them. Here I picked up the principle that in a data product, it’s honest to offer contentious aggregation standards as options.
4.2 “That’s not a trade!” — accuracy of transaction classification
On-chain activity isn’t just simple buying and selling. Token swaps, liquidity provision, and contract interactions are all mixed together. When the first version lumped such transactions together, users who looked up their real wallets pointed out things like “liquidity provision is counted as a trade, which distorts the win rate.”
This feedback led to building a transaction classification system. I classified trade types and applied different aggregation logic for each type. The gap between the data model a developer imagines and the data actually in real users’ wallets could only be found by users looking up their own wallets.
4.3 “Priced as of when?” — the timing problem
Profit and loss change depending on the price at which you value it. If you ignore price changes over time, the calculated results diverge from what the community feels is right. I improved it by integrating a real-time price API so profit and loss is calculated based on the time of each trade. This too started from users’ sense that “the numbers look off.”
The three cases have this in common: trust in an on-chain data product comes not from flashy features but from the consistency of its calculations. And the standard for that consistency is held by the community, not the developer.
5. Operations and Results
CryptoTrade.gg is deployed on Vercel and running (tradinggg.vercel.app). In the two-month development period, I completed the skeleton of a validation-stage product: wallet address lookup, multichain validation, four visualization views, and a cache-based data pipeline.
I’m also clearly aware of the current limits.
- Chain coverage: The supported chains are limited. The adapter layer keeps the cost of expansion low, but securing a data source for each chain comes first.
- Depth of analysis: It currently focuses on visualizing records. Advanced analysis such as trade pattern analysis and risk metrics is the next step.
- Community features: There is room to expand beyond a lookup tool into a place where traders share and compare their records. But this has to be designed within the bounds of the product identity as a verification tool.
6. Reusable Lessons
The principles I took from this project are now applied to Toris’s other products.
- Invest in the normalization layer. Convert heterogeneous external data sources into a common model in an adapter. The cost of expansion is contained in that one place.
- Make contentious aggregation standards options. If a product dictates a standard where the right answer differs by user, like whether to include gas fees, it loses trust.
- Keep infrastructure to the minimum needed to test the hypothesis. An external API plus caching instead of our own node. Scheduled refresh plus manual refresh instead of WebSocket. Scale up when the need is proven.
- Same data, different screen needs. Sample the trend chart and paginate the record list. Performance optimization starts from defining the screen’s purpose.
- QA for a data product should use real users’ data. Transaction classification errors were found not by the developer’s test wallet but by the community’s real wallets.
Links
Advertisement