Skip to content
Paybius Swap · AMM exchange

Automated market maker DEX on Binance Smart Chain

Trades, settled by contract.

How HexaFlow built Paybius Swap: a peer-to-peer decentralised exchange on Binance Smart Chain, where trades execute through smart contracts instead of an order book — and the people who supply the liquidity are rewarded in the platform's own token.

How a trade executesno order book

The pool's liquidity providers are rewarded on-chain, in the platform's native token.

Liquidity rewarded in the native token
Client
Paybius
Industry
Blockchain
Region
Global
Year
2023
The problem

On Ethereum, the fee can be bigger than the trade.

Decentralised exchanges on Ethereum work. But transaction cost and settlement time price smaller trades out entirely: when the network fee can exceed the value being swapped, a small trade stops making sense at all.

And on-chain there is a second, harder constraint. A contract bug is permanent and public. Once liquidity is committed there is no patch-and-deploy — whatever the contract does on day one, it does with everyone's funds in it.

Cost
When the fee can exceed the trade, small trades are priced out.
Permanence
On-chain, there is no second release. The contract has to be right before liquidity arrives.
01 Build on BSC

Put the exchange where small trades still make sense.

Binance Smart Chain was chosen for faster transaction times and lower fees than the Ethereum network. That is not a detail of the stack; it is the product decision that makes smaller trades viable at all.

AspectEthereumBinance Smart Chain
Network feesCan exceed a small trade Lower
Transaction timeSlower settlement Faster
Smaller tradesPriced out Viable

A qualitative comparison. The page quotes no fee or speed figures.

02 Trade through contracts, not order books

Nobody has to be waiting on the other side.

An order book only trades when two people agree at the same moment. Paybius Swap uses an automated market maker instead: trades execute through smart contracts rather than by matching orders, which removes the need for a counterparty to be present.

  • Peer-to-peer, through a contract. The trader's wallet sends one token to the pool contract and receives the other straight back.
  • No matching. There is no book to rest in and no buyer to wait for — the pool is always on the other side.
  • Executed by code. The smart contract prices the trade and settles it, on BSC.
One trade, two ways
Who has to be on the other side?
You
Sell token A
Order book
SellersSell A · restingSell A · resting
BuyersNone on your terms
Counterparty
Nobody yet

Place a sell order for token A and watch where it goes.

03 How the contract prices a trade

The price is arithmetic, not a negotiation.

Without an order book, something still has to set the price. An AMM takes it from the pool itself: two reserves, and a rule every trade has to respect. The best-known rule — the one modelled here — is the constant product: reserve A times reserve B stays the same, trade after trade.

Put token A in and the pool pays out exactly as much token B as keeps that product unchanged. The pool slides along the curve, and the price moves with it — gently for a small trade, steeply for a large one.

Drag the trade size and watch where the pool ends up. The numbers are a model in abstract units, not market data.

Constant-product pool · model
Drag the trade. Watch the price move.
Reserve A (x) →Reserve B (y) →0x · y = k+A in−B outbeforeafter
Pool before
100 A · 100 B
Pool after
140.00 A · 71.43 B
B you receive
28.57
Price before
1.00 B per A
Average you got
0.71 B per A
Price moved
49.0%

Model, not market data: abstract tokens, unitless reserves, fees left out. The product x · y stays at 10,000 on every trade.

04 Reward liquidity

The pool is its users — so they are paid for it.

A pool with nothing in it prices nothing. The reserves every trade runs against come from users, and users who provide liquidity earn rewards paid in the platform's native cryptocurrency, on-chain.

  • Deposit both sides of a pair, and a share of the pool is yours.
  • Deeper pools, steadier prices. More liquidity puts trades on a flatter stretch of the same curve.
  • Rewarded in the native token, paid on-chain.
Liquidity · model
Be the other side of the trade.
The pool33.3% yours
The same 20 A trade moves the price
Without you30.6%
With you22.1%

A deeper pool sits on a flatter stretch of the curve, so trades move it less.

Rewards, in the native tokenProvide liquidity to start earning
How it's built

Contracts that execute the trade, and an app that brings you to them.

Off-chain
InterfaceNext.js

The exchange itself: the market list, swap and liquidity, in the browser.

Application back endLaravel

The server side of the platform, alongside the chain.

Wallet connectionWeb3

Connects the user's wallet to the contracts, to sign trades and deposits.

On-chain · BSC
Smart contractsSolidity
  • AMM trade execution
  • Liquidity pools
  • Rewards in the native token

Permanent and public once deployed — the layer that has to be right first.

What we built
  1. 01A decentralised exchange on Binance Smart Chain supporting peer-to-peer cryptocurrency trading.
  2. 02An automated market maker model executing trades through smart contracts.
  3. 03Liquidity provision rewards paid in the platform's native token.
Stack
Next.jsWeb3LaravelSolidityBSC

Services: Blockchain & Web3 · Web Application Development

Outcome

What changed.

Trading viable at smaller sizes through lower network fees

Trades executed without order books or counterparty matching

Liquidity providers rewarded on-chain

Next

Related work.

SCORA — Security assessments that end in proof, not a PDF
Flagship

SCORA

SCORAEnterpriseGlobal

Security assessments that end in proof, not a PDF

A security assessment and remediation platform: nine frameworks, every gap routed to an owner, evidence checked and read by AI, and an auditor-ready closure record — in English and Arabic.

Next.jsTypeScriptPostgreSQL
Read case studySee SCORA live
Nexus — The business card that never goes out of date
Flagship

Nexus

NexusEnterpriseGlobal

The business card that never goes out of date

An NFC and digital business card platform that runs a whole company's cards from one console, in five languages, across the UK, Europe and the Gulf.

Next.js 16React 19TypeScript
Read case studySee Nexus live
AI-Powered LMS & Proctoring — Three role modules — school, teacher and student — with computer-vision proctoring
Flagship

AI-Powered LMS & Proctoring

Security CirclesEducationGlobal

Three role modules — school, teacher and student — with computer-vision proctoring

A multi-tenant platform with three distinct role modules — school administrator, teacher and student — backed by computer-vision proctoring, a randomised question engine and automatic certification on pass. We also produced the entire curriculum that runs inside it.

AngularNode.jsPython