Appearance
Bridge fees
Where the bridge fee is taken, where it goes, and how to check that it arrived. The rate and who pays it are covered on the bridge overview; this page is for whoever operates the bridge.
The short version
A fee is charged only on swaps that touch the KriptoNyx chain. It is withheld at a vault boundary — the paying vault releases the net amount and holds the difference back — and then forwarded to the address in BRIDGE_FEE_ADDRESS once the user has been paid.
Configuration
One setting, in bridge/backend/.env:
bash
BRIDGE_FEE_PERCENT=2.5
BRIDGE_FEE_ADDRESS=0xYourFeeWalletBRIDGE_FEE_ADDRESS is read at startup, and the bridge says which address it will use in its first lines of log:
🚀 KriptoNyx Bridge Backend running on port 3101
💰 Bridge fee -> 0x1EFDf2d066e303F68a02B7344053a772f18BdF44Leave the value empty and the log says so instead; fees then stay in the vaults, which is how the bridge behaved before fee forwarding existed.
The address must work on both chains
Fees arrive in whichever asset they were charged in — WKNYX or USDT on BSC, KNYX or KUSD on KriptoNyx — so the destination has to be an address you control on both. An ordinary wallet address is fine; a contract that exists on only one chain is not.
Which vault sends what
The fee is always taken in the asset the paying vault is releasing, which depends on the route:
| Route | Fee asset | Sent by |
|---|---|---|
| Direct vault bridges (KNYX ↔ WKNYX, USDT ↔ KUSD) | The target asset | Target-chain vault |
| KNYX into USDT or KUSD, via the BSC pool | WKNYX | BSC vault |
| Pool then KNYX vault | KNYX | KriptoNyx vault |
| Multi-hop out of KUSD | USDT | BSC vault |
| Multi-hop into KUSD, and SimpleSwap then bridge into KUSD | KUSD | KriptoNyx vault |
| BSC-internal pool swaps, and SimpleSwap between two external assets | — | No fee: no vault is involved |
When it moves
Withholding and sending are deliberately separate:
- Withheld. As the vault releases the net amount, the fee is recorded against the swap — amount, asset, chain and decimals. Nothing is sent yet.
- Sent. Once the user has been paid, the recorded fee is transferred to the fee address and the transaction hash is stored.
A multi-leg route that fails half way through therefore leaves the fee in the vault, where a refund can still reach it, rather than having paid the operator for a swap that never completed.
A fee transfer never fails a swap. If the transfer reverts — an empty vault, a bad address, an RPC outage — the swap stays completed, the reason is recorded, and the fee stays in the vault. Native fees also keep a small gas float back, so collecting one can never leave a vault unable to pay for its next transaction.
Checking a fee
Each swap row carries the outcome:
| Column | Meaning |
|---|---|
fee_amount | How much was withheld |
fee_asset · fee_chain | What it was withheld in, and where |
fee_decimals | Decimals of that asset |
fee_tx_hash | The transfer to the fee address; empty until it is sent |
fee_error | Why a transfer failed, when one did |
sql
-- fees collected, newest first
SELECT id, fee_amount, fee_asset, fee_chain, fee_tx_hash
FROM swaps WHERE fee_tx_hash IS NOT NULL ORDER BY updated_at DESC LIMIT 20;
-- withheld but not sent: these are still sitting in a vault
SELECT id, fee_amount, fee_asset, fee_chain, fee_error
FROM swaps WHERE fee_amount > 0 AND fee_tx_hash IS NULL;The log records each collection as it happens:
Bridge fee for 7e0da07a-…: 0.25 KUSD on KRIPTONYX -> 0x1EFD…dF44 (0x3341c2…)Changing the address
Edit BRIDGE_FEE_ADDRESS and restart the bridge:
bash
pm2 restart kriptonyx-bridge
pm2 logs kriptonyx-bridge --lines 20 --nostream | grep 'Bridge fee'Fees already sent are unaffected; anything withheld but not yet sent goes to the new address.
Fees charged before forwarding existed
Fee forwarding was added on 2026-09-21. Fees from earlier swaps were never recorded and are still held by the vaults that took them. They can be moved by hand if wanted, but nothing does it automatically.