← All projects

Near-FusionSwap

Two chains, two locks, one secret.

EventETHGlobal Unite DeFi 2025 · 1inch Fusion+ track
My roleTeam build · I wrote the contracts and backend
Near-FusionSwap site preview
$5,000

won at ETHGlobal Unite DeFi, on the 1inch Fusion+ track

  • Polygon mainnet ↔ NEAR
  • Atomic: settles or refunds
  • 1inch Fusion+ cross-chain SDK
The problem

Moving tokens between Polygon and NEAR usually means trusting a bridge to hold your funds in the middle.

What I did

I wrote the Solidity escrow contracts with Foundry, the NEAR HTLC contracts and the NestJS backend for swaps and orders. A teammate built the frontend.

SolidityFoundryNEARNestJS1inch Fusion+
How it works
  1. Lock on both chains

    Hash time-locked contracts escrow the funds on Polygon and on NEAR, both locked to the same secret hash.

  2. Reveal to claim

    The user reveals the secret to claim on one chain. That reveal is exactly what the resolver needs to claim on the other.

  3. Refund on timeout

    If either side stalls, the time locks expire and both sides get their funds back. It settles completely or not at all.

  4. Route through 1inch Fusion+

    Orders go through the 1inch cross-chain SDK, with a NestJS backend handling swap and order logic.