m.moddie / dev
← All projects
Project / 07

PaperPump

An archived TON prototype: my Tact contract system and a TypeScript transaction parser built from scratch.

Tact · TON · Smart contractsPaperPumpTact / TypeScript / TON / TonAPI / Express
Role

Blockchain / Indexer Engineer

Period / format

2025

Status

Independent Project

My contribution

  • Developed Tact smart contracts and a high-performance TON blockchain indexer in TypeScript: transaction tree traversal, opcode instruction decoding, and Jetton metadata extraction.

TypeScript, Tact, TON, TonAPI, @ton/core

01 / About the project

About the project

An archived TON prototype: my Tact contract system and a TypeScript transaction parser built from scratch.

02 / Architecture study

Tact contracts and a custom TypeScript parser

I developed a system of interacting smart contracts in Tact and built its transaction parser from scratch in TypeScript. The parser fetches transaction traces from TonAPI, walks the tree of internal messages and extracts structured data for Jetton creation and purchases. PaperPump remains an archived prototype.

03 / Product idea

A creator deploys a Jetton through the market contract. Buyers move the price along a cubic bonding curve; sellers return tokens through the Jetton wallet flow and receive TON from the market reserve. An indexer translates on-chain activity for the API and interface.

Contract and data flow

Internal TON messages connect independently deployed contracts.

TON MESSAGE FLOW
01

Next.js / wallet

Create and trade

02

Market

Factory, curve, TON reserve

03

PaperJetton

Master and controlled mint

04

JettonDefaultWallet

Holder balance and transfer

05

Indexer

Events into application data

What the prototype demonstrates

01

My contribution: a TypeScript indexer

Built a custom parser for my Tact contract system using TypeScript, Express, TonAPI and @ton/core. It routes creation and purchase messages by opcode, traverses transaction traces, reads contract getter results and decodes Jetton metadata into structured reports.

02

Keeping network context during serialization

During testnet development, default address formatting omitted the test-only flag. Raw TON addresses do not encode this flag. I introduced a shared formatter that receives the selected network and sets testOnly when producing user-friendly addresses. The same network value selects the API endpoints and configures the HTTP response serializer. This explicitly restores presentation context; it does not change the account address or infer the network from it.

03

Market as factory

The root contract derives StateInit and deploys a separate PaperJetton master for every launch.

04

Multi-contract trading

Buy triggers minting through the master and holder wallet. Sell travels back as TokenNotification, then burns tokens and releases TON.

05

Deterministic curve math

The cubic curve uses integer arithmetic, explicit precision and an integer cube-root implementation suitable for the VM.

06

Address verification by construction

Expected child addresses are derived from code and data instead of accepted as arbitrary input.

07

Subscription NFT experiment

A minter, collection and item contract model time-bound activation separately from token ownership.

Project map

Tact contract logic and the TypeScript parser that turns transaction traces into application data.

PAPERPUMP / CONTRACTS
PAPERPUMP / CONTRACTS
contracts/Tact workspace
contracts/marketCore/v1/launch and trading protocol
market.tactfactory · curve · reserve · fees
paperJetton.tactJetton master controlled by Market
math.tactinteger cubic root
messages.tactcreate · buy · sell · withdraw
contracts/standards/jetton/master and holder wallet
contracts/standards/nft/collection and item base
contracts/subsNftMinter/v1/time-bound subscription experiment
tests/v1/TON Sandbox integration scenarios
indexer/TypeScript · Express · TonAPI
src/services/parser/v1/trace traversal · opcodes · Jetton metadata
utils.tsexplicit network-aware address formatting
src/controllers/HTTP response serialization
frontend/Next.js trade interface
backend/application and bot prototype
Prototype boundary

The project was not completed or released. The sell path still contains an unresolved wallet-sender verification marker, and the subscription minter contains an unfinished forwarding flow. It is presented as a Tact and multi-contract architecture study, not as a production protocol.

06 / System architecture

System architecture

Contract-level map of creation, cubic-curve trading, Jetton wallet messages, indexing and the unfinished subscription NFT branch.

Open interactive diagram ↗