CHAIN connecting…

Swap with Bitcoin, Ethereum and Solana, with no bridge

Swap DZY for SOL, BTC, ETH or USDC on their own chains with a hash lock: no bridge, no wrapped coins, and nobody holding the money in between.

Dznye works side by side with other blockchains. You can swap DZY or any Dznye token for SOL, BTC, ETH or USDC on their own chains, with someone on the other side, and neither of you has to trust the other or anyone in the middle. There is no bridge to hack and no wrapped copy of anything: the USDC you get is the real one, on its own chain.

The idea: one secret opens both locks

A hash lock holds coins until someone shows a secret, or gives them back after a time. The lock only shows a fingerprint of the secret (its SHA-256 hash), so nobody can open it early. Bitcoin, Ethereum, Solana and Dznye can all check the same fingerprint, so one secret can open a lock on each of them.

  1. Alice locks first, on Dznye. She makes a secret, keeps it, and locks 1,000 DZY for Bob: "his if he shows the secret within 24 hours". She gives Bob the lock code (the fingerprint).
  2. Bob locks on his chain with the same code. On Solana he locks 5 USDC for Alice: "hers if she shows the secret within 12 hours". His time is shorter on purpose.
  3. Alice takes the USDC by showing the secret on Solana. Showing it makes it public.
  4. Bob takes the DZY with that same secret, now public, on Dznye.

If anyone stops halfway, the times run out and each lock gives its coins back. Either both sides happen, or neither does.

The one rule

The side who locks second must use a shorter time, and must check the first lock before locking. That way the first side's secret is always revealed early enough for the second side to use it.

Do it in the wallet

  1. Open Swap in your wallet.
  2. If you lock first: enter who it is for (a @name), what and how much, how long they have, and a note (for example "for 5 USDC on Solana to 8D5A…"). Leave Make a new secret selected and press Lock. Give the other person the lock code only. The wallet keeps your secret.
  3. If they locked first: choose Use the lock code someone gave me, paste their code, and choose a time shorter than theirs.
  4. To claim: enter the lock and the secret under Claim with a secret. Once a lock is claimed, its secret is shown publicly at market.dznye.com and by GET /swap/<lock>, so the other side can use it.
  5. If time runs out: press Take back on your lock, and the coins come back.

The other chain's side

Dznye uses plain SHA-256 of a 32-byte secret, the most common form, so the same secret and code work on all of them.

Pay on delivery, with the same lock

A hash lock is also a simple, fair way to pay for something you have not received yet. Lock the payment for the seller and keep the secret. When the item arrives, give them the secret and they claim it. If it never arrives, the time runs out and the money comes back to you. Nobody holds it in between.

Why not a bridge?

A bridge locks coins in one big pot on one chain and prints copies on another. That pot is a target, and bridges are where the largest losses in crypto have happened. A swap never pools anything: each coin stays on its own chain, and only the two people trading are involved. Bridges that the chain checks for itself may come later, built with that history in mind.

Costs and limits

For builders

const { secret, hash } = await dz.newSecret();
const lock = await dz.lock(me, '@bob', '1000', { hash, until: Date.now() + 24 * 3600e3, note: 'for 5 USDC on Solana' });
await dz.claim(bob, lock, secret);          // anyone holding the secret, before the end
await dz.refund(me, lock);                   // after the end
const { status, secret: revealed } = await dz.swap(lock);

Transactions: swap.lock { to, asset, amount, hash, until, note? }, swap.claim { id, secret }, swap.refund { id }. See the developer kit.