Video thumbnail

MoleSwap

Cross-chain swap from TON to Ethereum using 1inch Fusion+ & BlockScout tracking

MoleSwap

Created At

ETHGlobal Prague

Winner of

Blockscout - Big Blockscout Explorer Pool Prize

Prize Pool

1inch - Extensions for 1inch Cross-chain Swap (Fusion+)

Prize Pool

Project Description

A fully scalable, intent-based cross-chain swap protocol enabling seamless token transfers from TON to Ethereum, with support for both EVM and non-EVM networks. The solution utilizes 1inch Fusion+ and the 1inch Limit Order Protocol for efficient and decentralized trade execution. Swaps are powered by a permissionless, hash-lock-based mechanism ensuring security and trustless settlement across chains.

The platform features an intent-based order book that allows users to express trade intentions without locking funds, improving flexibility and efficiency. Order tracking is handled via an extended version of BlockScout, enhanced to support TON and other non-EVM chains, enabling transparent and real-time cross-chain transaction monitoring.

Designed to support any token across multiple ecosystems, the architecture is built for broad scalability, allowing for the addition of new blockchains as the protocol evolves.

How it's Made

Our cross-chain swap solution is composed of multiple tightly integrated components, combining smart contracts, indexing infrastructure, and protocol-level innovations. The architecture is modular, permissionless, and designed for scalability across both EVM and non-EVM blockchains.

šŸ”§ Core Components TON Smart Contracts

We implemented a escrow contract factory and individual order contracts on the TON blockchain. These manage the source-side of the atomic swap, holding TON tokens in escrow secured by a hashlock.

EVM Smart Contracts

On Ethereum (Sepolia testnet), we deployed a corresponding escrow contract factory and order contracts that mirror the behavior of TON contracts. These handle ERC-20 tokens and ensure atomicity on the destination chain.

Hashlock Security

Swaps are secured using a hashlock-based mechanism, ensuring funds are only released if the correct secret is revealed, enabling trustless execution between unrelated chains.

Backend Indexer

A custom indexer was built to connect to both TON and Ethereum RPC nodes. It continuously tracks relevant smart contract activity, indexes swaps, and exposes real-time data to external interfaces (like BlockScout). The indexer is blockchain-agnostic and ready to support additional chains and tokens.

Extended BlockScout

We customized BlockScout to support:

Non-EVM chains (e.g., TON) by extending its schema and data models

Cross-chain transactions by linking related swaps across networks

A new UI/UX layer to display swap status, secrets, escrow details, and timing

This required deep changes in the MVC structure, new tables for tracking orders and secrets, and logic for rendering atomic swap flows.

Infrastructure & Deployment

The solution is currently deployed on:

TON Testnet

Ethereum Sepolia

DigitalOcean and AWS for backend services, indexer, and UI hosting

šŸ”„ Atomic Swap Flow āœ… Maker creates an escrow on TON, locking tokens with a hash of a secret.

āœ… Taker responds by creating a matching escrow on Ethereum, locking ERC-20 tokens.

āœ… Maker claims ERC-20 tokens by revealing the secret.

āœ… Taker observes the secret on-chain and uses it to claim the TON escrow.

šŸŽÆ Taker also withdraws a safety deposit (if applicable), completing the atomic swap cycle.

šŸ¤– Notable Hacks & Innovations Modified BlockScout to support a non-EVM chain (TON), which involved low-level database and parser modifications.

Unified cross-chain swap logic in a chain-agnostic backend indexer, allowing future integration with other chains like Solana or Aptos.

Combined 1inch Fusion+ routing with custom escrow logic to create a secure and user-driven intent-based order flow.

background image mobile

Join the mailing list

Get the latest news and updates