AptoTrade

2023

Abstract

A decentralized trading platform on Aptos, with wallets, orders, and real-time APIs. First place at Inter IIT.

1   Background and motivation

AptoTrade was a team project for an Aptos-sponsored Inter IIT challenge. The task was to build a decentralized trading platform with a usable exchange interface. I joined with limited Web3 experience, so the development involved learning how wallet interactions, on-chain state, and the trading protocol fit together while contributing to a functioning product.

2   System architecture

The repository separates Move contracts, backend services, and the frontend. Its documented deployment uses Aptos devnet, with contracts supporting the exchange-related state. The server is split into a price feeder, an API service, and an exchange service, with Kafka included in the local setup for communication between backend components.

REST endpoints expose operations such as instrument and trade queries, while WebSocket channels deliver changing ticker, index, order-book, and account information. This split lets the interface request specific information and subscribe to updates that would otherwise require frequent polling.

3   Trading interface and state

The frontend includes wallet connection, order placement, an order book, order history, and a portfolio view. Integrating these screens requires more than rendering market data: user actions initiate operations whose results may arrive later, and the interface has to reconcile local interactions with updated backend or chain state.

A substantial part of the development involved cases such as cancelling an order, clicking quickly, or refreshing during an operation. These interactions expose assumptions about when an action is complete and which state is authoritative. The project connected those concerns across the wallet, APIs, and visible account information rather than treating the trading screen as an isolated component.

4   Outcome and scope

The team won first place in the competition. The repository documents a devnet-based prototype, so the report does not imply a production exchange or an audited financial system. The main learning was building across asynchronous boundaries: a smooth interface requires an explicit understanding of which updates are provisional and which have been confirmed by the system behind it.