Connect a wallet

Your wallet signs; this site never sees a secret key. Pick the wallet you use on Kadena.

How Trade works

Smart Pacts Trade lets you swap one Kadena token for another, directly with other people. This guide explains how it works, what it costs and what to watch out for. Open Trade

What Trade is

Trade is an order book: a list of offers to swap one token for another. It runs as a contract on Kadena — a program on the blockchain that follows its own written rules. Nobody stands in the middle of a trade.

Nobody has to be online at the same time. Someone posts an offer and walks away; it stays open until others have taken all of it, or the person who posted it cancels it.

Five words you will see:

  • Order — an offer: “I sell this much of one token for that much of another.”
  • Maker — the person who posts an order.
  • Taker — the person who takes all or part of someone else’s order. On this page that is “buying from an order”.
  • Locked account — when a maker posts an order, the tokens they sell move into an account that belongs to that one order. Only the contract can pay out of it: to a taker, or back to the maker on cancel.
  • Chain — Kadena runs 20 chains side by side, numbered 0 to 19. Your account has a separate balance on each one. Every order lives on one chain.

Connect a wallet

Press Connect wallet at the top right of the page and pick your wallet: EckoWallet (browser extension), Zelcore or Koberlet (desktop apps), a Ledger with the Kadena app (in Chrome, Edge or Brave), or a mobile wallet such as Linx (scan the QR code with WalletConnect).

Your wallet signs every transaction. This site never sees your secret key or your recovery phrase.

Trade works with ordinary k: accounts — the account name is k: followed by your public key. If your wallet gives another kind of account, the page tells you.

Each transaction costs a tiny network fee, paid in KDA on the chain where it happens. Keep a little KDA on the chains you trade on.

Buy from an order

  1. Pick a pair at the top, for example BRO/KDA. The order book shows asks (people selling the first token) and bids (people buying it), with each order’s price, amount and chain.
  2. Click an order. The Take this order panel opens.
  3. Type how much you want, or press 25 %, 50 %, 75 % or All. You can take any part of an order; the rest stays open for others.
  4. As you type, the page asks the contract for the exact figures: what you pay, what you receive after the fee, the price, the chain, the network cost and the maker’s full address. Open Review the details to see every amount and where it goes.
  5. Press the button (for example Buy on chain 2). Your wallet opens. Check it and sign.
  6. Kadena makes a new block about every 30 seconds, so the trade usually lands within a minute. The result appears in the Activity log, with a link to the explorer.

What your wallet asks you to sign — and why only that

Your wallet asks you to approve exactly the transfers in the contract’s own quote: the payment to the maker, the fee, and the network cost. Nothing else. The amounts it shows are the most that can leave your account.

A Ledger shows a code instead of the amounts. The page shows the same code next to the button, so you can compare.

Why only those: during a trade, the token the maker chose runs its own code under your signature. If you approved more than the quote, that token could take the difference. So the page asks for exactly the quote — and you should never approve more than that in any other tool.

When a price looks wrong

The page compares every price with a market reference, read from markets already on Kadena (or, when there is none, from the best price on this book). When a price is more than 20 % worse for you, the page says so and waits until you tick I have checked this price.

When your coins are on another chain

If what you pay with sits on a different chain from the order, the button offers to move it first — for example Move 10 KDA to chain 2 and buy.

A move between chains has two steps: your wallet signs the send, and a few minutes later the coins arrive on the other chain. Then the purchase follows. Sometimes your wallet also asks you to sign the arriving step.

If a move stops halfway, nothing is lost: the coins are held by the transfer itself. Finish the move under Account completes it.

Post an order

In Place an order, choose Buy or Sell, then Limit or Market.

  • Limit — you name your price and amount. First, the page takes whatever already sits on the book at your price or better. Anything left is posted as your order, at your price.
  • Market — you name only the amount. The page takes the best orders one after another, but never past the worst price you accept (the page suggests one, and you can change it). Nothing is posted: whatever the book cannot fill within your price is simply not filled.

Either way it is one transaction on one chain: all of it happens, or none of it.

Your order and its locked account

The tokens you sell move into a locked account that belongs to your order alone. Every order has its own, so a fake or hostile token in someone else’s order can never reach yours.

Your order stays on the book until it is fully taken or you cancel it. Orders never expire. You do not need to stay online: when someone buys, the payment goes straight to your account.

You are never paid less in total than your price, less the fee: each partial purchase is rounded in your favour, and whoever takes the last piece pays exactly what is left.

The highest fee rate you accept

Every order states the highest fee rate you accept — the rate the page showed you. If the fee went up before your order lands, the order is refused instead of being posted at the higher rate. Once posted, your order never pays more than that rate.

Check your price

A wrong price is your own mistake. If you type 30 instead of 300, the contract sells at 30, and nobody can reverse it. The page warns you when a price is far from the market reference — read the warning.

Cancel an order

Under Your orders, press Cancel order, then confirm. Cancelling closes the order to buyers at once and returns what is still locked in it to your account, on the same chain.

You can cancel at any time. Only you can cancel your order, and nobody else’s approval is needed.

The contract also lets you take locked tokens back in parts: each cancel returns exactly the amount it names, and you can repeat it. This page returns everything in one go. If anything is ever left in a cancelled order’s locked account, the order shows Take back the rest.

When two orders meet

Sometimes two orders on the same chain meet in price: one person sells at 100, and another offers 100 or more. Anyone can settle them against each other. Neither maker has to come back or sign.

Each maker is paid at the price of the order that was there first; the newer order keeps the difference. Neither side ever gets a worse price than the one it posted. (If both orders landed in the same block, whoever settles them picks whose price is used — still never worse for either side.)

When the page sees two such orders, it shows a Match them button. It costs only the network fee.

Chains

Each of Kadena’s 20 chains keeps its own order book. An order can be bought, matched or cancelled only on the chain where it was posted, and nothing moves between chains on its own.

The order book on this page shows the orders of every chain together, each with its chain. When you post an order, the Chain box suggests the chain that already has the most orders for that pair; you can pick another.

To trade on a chain you need the tokens, and a little KDA for the network fee, on that chain. When they are elsewhere, the page can move them first.

Fees

The fee is a percentage of what each side receives: 1 %, unless the governance keys change it (below). Each fee is rounded down to the token’s smallest unit, so it is never more than the rate. The trade page always shows the rate in force above the order book.

An example at 1 %

  1. Bob posts an order: 3 BRO for 300 KDA. His 3 BRO move into the order’s locked account.
  2. Alice buys 1 BRO and pays 100 KDA: 99 KDA go to Bob and 1 KDA is the fee. From the locked account, 0.99 BRO go to Alice and 0.01 BRO is the fee.
  3. Bob’s order is now 2 BRO for 200 KDA, and stays open.

Where fees go

  • A fee paid in KDA goes straight into the Smart Pacts Token’s funding account on the same chain.
  • A fee paid in any other token goes to an account in that token held by the Smart Pacts Token’s governance keys. Only those keys can spend it.
  • Before you sign, Review the details shows the full account each fee goes to.

Who sets the rate

Any two of Smart Pacts’ three governance keys, signing together, can change the rate at any time, anywhere from 0 to 5 %. One key alone cannot, and nobody else can. They keep this power even if the contract is frozen.

An order always pays the lower of two rates: the rate when it was posted, and the rate in force now. So a rise never takes an order above the rate it was posted at, and a cut below that rate reaches it at once. (If the rate is cut and later raised again, an older order goes back up — but only as far as the rate it was posted at.)

When you buy, you pay the rate of the order you buy from, as your quote shows it. If the rate changes between your quote and your transaction, the transaction is refused and the page reads a new quote. Nobody pays more than they were shown.

The smallest trade

Makers set no minimum. The contract has a floor, so that every fee is at least one smallest unit of each token.

At a rate of 1 %, an order, and each partial purchase from it, must be at least 100 smallest units of each token. For KDA, which has 12 decimals, that is 0.0000000001 KDA; for a token with 2 decimals, it is 1.00. A higher rate makes the floor smaller, and a lower rate makes it larger.

Taking everything that is left of an order is always allowed, however small. If the leftover of your limit order would be below the floor, the page leaves it out and tells you.

Tokens

Any token that follows Kadena’s standard token interface can be traded. There is no list to be on and nobody to ask. A few old tokens cannot hold an order’s locked account; the contract refuses those when someone tries to post them.

Listed and not listed

The pair menu offers tokens from the Mercatus token list; the page calls them “listed”. That is all it means: nobody at Smart Pacts has read any token’s code. You can also type any token’s full name in a custom pair. A token that is not listed is always shown by its full name, marked “not listed”, with a warning.

Fake lookalike tokens

Anyone can publish a token with any short name, so there can be many tokens called BRO. A token is identified only by its full name — for example, KDA’s full name is coin, and a BRO token’s full name is n_ followed by 40 letters and digits and then .bro.

Always check the full name before you trade. If you buy a worthless or fake token, you get a worthless token. The contract does not judge tokens.

Risks, said plainly

There is no undo

Nobody can undo a trade — not you, not the other side, not Smart Pacts. The contract has no function that pauses the market, reverses a trade, or changes someone’s order.

Who controls the contract

The contract is controlled by Smart Pacts’ governance: three keys, any two of which must sign together. It is not frozen, and while it is not frozen, two of those keys can replace its code. They can also move tokens out of any order’s locked account, or set the fee above 5 %, without replacing the code — and the order book would show nothing of it. They can even hand control of the contract to a single key. So posting an order means trusting those keys with what you lock. Buying from an order does not: the whole trade happens in one transaction, and nothing of yours stays behind.

Token owners have their own powers

If a token’s own owners can freeze, seize or pause it, they can do that to tokens locked in an order too. No marketplace can prevent what a token’s owners do.

A hostile token

Paying with, or receiving, an unknown token runs that token’s own code under your signature. A hostile token can use that moment to act on other accounts you own that are not ordinary k: accounts. Trade only tokens whose full name you know.

Tokens sent to a locked account by hand

Never send tokens to an order’s locked account yourself. If they are the token the order sells, the maker gets them back on cancel. Any other token sent there has no way out.

Security and reviews

Before the contract went live, Smart Pacts checked it in eight rounds of review. These were Smart Pacts’ own reviews, not an audit by an outside firm. They read the code looking for flaws, ran long generated series of orders, purchases and cancels — hostile tokens included — against a written model of the rules, and changed the code on purpose hundreds of times to check that the tests notice. Every problem found was fixed, or written down as a known limit.

Reviews lower the risk; they do not remove it, and they do not change who controls the contract — see “Who controls the contract” under Risks.

The contract’s code is published on GitHub at github.com/SmartPacts/trade ↗, with its tests and a script that lets anyone check that the code running on Kadena is exactly the published code.

To report a security problem, write to contact@smartpacts.io. For a sensitive report, say first that you have one, without the details, and we will set up a private channel with you. A person answers within 72 hours, and you get our assessment, with our reasoning, within 10 days. There is no bug bounty.

Questions people ask

Why was my order or purchase refused?

The page shows the reason in the Activity log. The usual ones: the amount is below the floor (“too small”); the fee changed since you saw it (the page reads a new quote); the amount has more decimals than the token allows; someone took the order first (“Order is not open”, or the amount is more than what is left); you do not have enough of the token, or enough KDA for the network fee, on that chain; or your account in the token you would receive already exists with a different key, so the contract refuses rather than pay into an account you may not control.

Why can’t I reuse an order’s name?

Every order has a name, chosen when it is posted. The contract knows an order by your account plus that name, and keeps every order’s record for good, whether it was filled or cancelled. So each name can be used once per account on each chain. This page picks a new random name for every order, so you never have to think about it; other tools must do the same.

Why did I receive slightly less than price times amount?

The fee (1 % unless changed) comes off what each side receives. Fees are rounded down, and each partial purchase is rounded in the maker’s favour by at most the token’s smallest unit. The quote shows the exact figures before you sign.

Can an order expire?

No. An order stays open until it is fully taken or its maker cancels it.

What if this website is down?

The contract runs on Kadena, not on this website. Your orders stay on the book, others can still buy from them, and you can still cancel — with any tool that can sign a Kadena transaction calling n_48867b242317a0216a67f8c7ca26696b5878e0e3.trade on the order’s chain.

Can Smart Pacts undo my trade?

No. There is no undo for anyone. A finished trade stays finished.

Can Smart Pacts touch the tokens in my order?

While the contract is not frozen, yes: two of its three governance keys could move them. See “Who controls the contract” above. Buying holds nothing of yours, so this risk is only for tokens you lock in an order.

Can the fee on my order go up?

Never above the rate when it was posted. If the rate is cut below that, your order pays the lower rate at once; if the rate is raised again later, your order goes back up, but only as far as the rate it was posted at.

Do I have to stay online until my order is filled?

No. Post it and leave. When someone buys, the payment goes straight to your account on that chain.

Why can’t I see my order?

Check the pair and the chain: each order lives on one chain. If a chain did not answer, the page says so — orders there are simply not shown until it answers again. Press Refresh to read the book again.

Can I buy from my own order?

No, the contract refuses it. Cancel the order instead to get your tokens back.

Why does my wallet ask me to approve several transfers?

One purchase can pay a maker and a fee in one token, and it can take several orders at once — payments to the same account are added together. Each transfer the wallet shows comes from the contract’s own quote. Approve only what the page showed you.

My move between chains stopped halfway. What now?

Nothing is lost. The coins are held by the transfer until they arrive. Open Account and press Finish the move; the arriving step usually becomes possible within a few minutes.

Why does the page say it trades from k: accounts only?

This page signs from ordinary k: accounts. The contract itself also accepts some other account kinds, but this page does not offer them.

← Back to Trade