Skip to content

Docs

How it’s built.

What runs where, how a payment becomes “complete”, and where you can check each claim yourself. Written in plain language; everything here is how the product works today.

The pieces

  • The web app. The pages you use (invoices, payment links, payouts, the dashboard) and the server behind them. It prepares payments but cannot move money.
  • Your wallet. QIE Wallet or MetaMask. It holds your keys and signs every payment. Tidewire never sees your keys.
  • The router contract. A small smart contract on QIE Mainnet that settles each payment: it sends the money from the payer to the merchant and the fee to the fee recipient in one transaction, and keeps no balance of its own.
  • The payment sync. The indexer that reads the router’s events from QIE and is the only part that can mark a payment complete. It runs as a short pass on the web app’s own servers, so no separate server has to stay on. A pass starts while a payment is waiting on its checkout page, in the background when you use the app, once a day from a Vercel cron, and every 15 minutes from a GitHub Actions workflow. Each pass takes a database lease so only one runs at a time, and carries on from the last block it read.
  • The database. PostgreSQL holds invoices, links, recipients and a double-entry ledger. The database itself rejects an entry whose debits and credits do not balance.
  • QIE services. QUSDC is the digital dollar every payment is made in. QIEDEX lets a payer who only holds QIE swap for the dollars they are short. The QIE price oracle turns the network fee into a dollar estimate.

How a payment is confirmed

  1. The server creates the payment request: the amount, the recipient’s wallet and the token. The checkout page takes these only from the server, never from the link you clicked.
  2. Before your wallet is asked to sign, the checkout shows the token address, the amount, the network and the recipient, and checks them again.
  3. In your wallet you approve exactly the amount and call the router. The router moves the money and the fee in the same transaction, or does nothing at all.
  4. As soon as your wallet returns a Transaction ID, the page says “Confirming on QIE”. That report from the browser never marks a payment complete.
  5. The payment sync sees the router’s settlement event on QIE, waits for 3 confirmations, and only then marks the payment Completed and posts the ledger entries.

This is why a receipt can be trusted: it exists only after the network itself has confirmed the payment, and it links to that confirmation on the QIE explorer.

How money is counted

Amounts are whole numbers of the token’s smallest unit (QUSDC has 6 decimals), never decimals with rounding. The fee is the amount times the fee in basis points, divided by 10,000, rounded down. The contract and the app use the same formula. The published rates are 0.50% on invoices and payment links and 0.00% on payouts, with a hard cap of 1.00% written into the contract.

Paying with QIE

If a payer holds QIE but not enough QUSDC, checkout offers to swap QIE for exactly the missing QUSDC on QIEDEX, shows the quote first, and refuses a swap whose price impact is above 3%. After the swap the payment goes through the router like any other, so the merchant still receives the exact amount.

The contract

TidewireRouter is small, is not upgradeable, and its source code is verified on the QIE explorer (read it there). It supports single payments and batch payouts of up to 200 recipients in one transaction, all or nothing.

What its owner can and cannot do is written out on the Security page, and the first real payments are listed with links in the Evidence log.

What is not built yet

Coming soon, not availableBank transfers, local-currency payouts, bill payments and cards. No fiat money moves through Tidewire today, and none of these will go live except through licensed partners.

Source code

The application code is public at the project repository. The router’s verified source is also on the QIE explorer.

How it’s built · Tidewire