• dex
  • Decentralized Finance & NFT

ShibaSwap: a high-volume DeFi exchange with a native NFT marketplace

An automated market maker, multi-token staking and an on-chain NFT marketplace, built to stay up under heavy retail traffic on Ethereum and its layer-2.

  • Blockchain Engineering
  • Smart Contracts
  • NFT Infrastructure
The ShibaSwap swap interface with a Swap and Cross Chain toggle, BONE and TREAT token selectors, and a Connect Wallet button.

At a glance

Sector
Decentralized Finance & NFT
Type
dex
Services
Blockchain Engineering · Smart Contracts · NFT Infrastructure

The problem

What it had to solve

Retail users were the whole point of the ecosystem, and Ethereum gas fees were pricing them out of it — a small swap could cost more than the swap was worth. When large numbers of people tried to swap, stake and trade NFTs in the same window, the platform had to do it without failed transactions or fees that made a small trade pointless.

Three tokens, SHIB, LEASH and BONE, needed to work as one rewards engine rather than three disconnected mechanics. A 10,000-piece NFT collection, the Shiboshis, had to live inside the exchange rather than on a third-party marketplace. The build had to unify all of it under a single dashboard.

What we built

How it works

The exchange runs a dual-layer AMM. V1 handles classic liquidity provision through pooled SSLP tokens. V2 adds concentrated liquidity, where each position is minted as an NFT so a provider can target a specific price range instead of spreading capital across the whole curve.

The NFT marketplace is native to the exchange rather than bolted on, with metadata stored on IPFS so the assets stay reachable off any single server. Staking (Bury) and reward claims (Woof) were built as separate contracts, with rewards released on a vesting schedule rather than all at once, so a payout does not immediately turn into sell pressure.

Calls we would still defend

  • Gas cut at the contract levelpacked storage, custom errors, and calldata instead of memory, so a swap costs less to run because of how the contracts were written, not because of tuning after the fact.

  • NFT liquidity positions in V2, so a provider targets a price range and the same capital does more work than it would as a fungible LP token.

  • A cross-chain bridge to the project's layer-2, so users can move assets to where transactions are far cheaper while final settlement stays on Ethereum.

Built with

  • Solidity (v0.8+)

    The AMM and staking contracts are written in Solidity, where the gas work happens — packed storage, custom errors — and where security has to hold because the code is public and permanent.

  • IPFS

    Shiboshi NFT metadata lives on IPFS, so the artwork and traits stay reachable without depending on one server staying online.

  • React / Node.js

    The Dig, Bury and Woof dashboard is React on a Node.js backend, built to hold up with a lot of users reading balances and prices at the same time.

  • Ethers.js & The Graph

    Ethers.js talks to the contracts; The Graph indexes on-chain events so the dashboard can show positions and rewards without scanning the chain live.

Where it landed

What the build changed

3

Products built

an AMM swap, multi-token staking and an on-chain NFT marketplace

Layer-2

Scaling route

a bridge to the project's L2 for cheaper transactions; settlement stays on Ethereum

Contract-level

Gas reduction

packed storage, custom errors and calldata over memory

FAQ

The questions this build raises

What was actually built, the constraints it had to meet, and how it holds up in use.

  • The load problem is concurrency: many users swapping, staking and trading NFTs in the same window. The dashboard reads prices and balances through an indexer (The Graph) rather than scanning the chain live, and the contracts are written to keep each transaction cheap to run, so a traffic spike does not turn into failed transactions.

  • Yes — that was the point here. NFT trading runs on the same platform as swaps and staking, with metadata on IPFS so the assets stay reachable. Users do not leave for a third-party marketplace to trade the collection.

  • Two levers. The contracts are written to spend less gas (packed storage, custom errors, calldata over memory), so each transaction costs less to run. And a bridge lets users move to the project's layer-2, where fees are far lower, while final settlement stays on Ethereum.

  • Usually not. A layer-2 bridge earns its place when your users are price-sensitive and your volume is high enough that L1 gas is the thing stopping them, which was the case here. If you are earlier than that, the same effort is better spent on getting the exchange itself right, and the bridge can come later.

Keep looking

  • dex

    tanX

    Decentralized Finance

  • exchange

    WazirX

    Cryptocurrency & Fintech

Want to start a project?