Kinky Swap

Kinky Swap

Poor but sexy non-vanilla cross-chain swaps

Created on 21st June 2025

Kinky Swap

Kinky Swap

Poor but sexy non-vanilla cross-chain swaps

The problem Kinky Swap solves

Kinky Swap | Poor but sexy non-vanila cross-chain swaps for the tasteful and anonymous.

Problem:
Currently, there's no direct interoperability between Aleo and Aztec, two nascent blockchain networks focused on privacy. This lack of a cross-chain bridge or atomic cross-chain swap mechanism prevents users from seamlessly transferring assets or liquidity between these ecosystems.

Solution
Kinky Swap enables atomic, anonymous cross-chain bridges and swaps between Aleo and Aztec. Our platform allows users to trustlessly move any asset from Aleo to Aztec and vice-versa, enhancing comosablity within the nascent privacy-focused blockchain space.

Trustless, Permissionless Cross-Chain Swaps

Users can swap tokens between Aleo and Aztec chain without depositing into a centralized bridge or relying on a custodian. All lock-and-release logic lives on-chain in hash timelock escrow contracts, so swaps either complete atomically or not at all.

Leveraging ZK for Privacy

Kinky Swap leverages zero-knowledge proofs (ZKPs) inherent in both Aleo and Aztec to facilitate private transactions.

Architecure

  • Backend: A private backend allows makers to post orders with minimal information, enabling takers to consume them.
  • Frontend: Allows users to interact with the application through wallet injection.
  • Aleo Escrow Program: Symmetric Leo program deployed on Aleo testnet that allows sending/receiving tokens to/from the Aztec network.
  • Aztec Escrow Smart Contract: Symmetric Noir smart contract deployed on Aztec testnet that allows sending/receiving tokens to/from the Aleo testnet.

Swap Phases

  1. The maker generates a secret and posts on Kinky Swap the intent to make a cross-chain swap with the hash of the secret.
  2. The taker takes the intent; the maker is notified.
  3. The maker locks the input amount in the source escrow contract. The tokens will be locked until deadline time t1.
  4. The taker locks the output amount in the destination escrow contract. The tokens will be locked until deadline time t2 (t2 < t1).
  5. If the maker is OK, it will withdraw the output amount from the escrow contract on the destination chain, effectively revealing the secret.
  6. The taker will have time t1-t2 to withdraw the input amount on the source chain safely.

The idea is based on the on-chain logic described in the paper: 1INCH FUSION+ INTENT-BASED ATOMIC CROSS-CHAIN SWAPS

Challenges we ran into

In addition to the technical complexities inherent to working with multiple zk DSLs and SDKs at the same time, we had the following issues and successfully adopted workarounds. Both Aleo and Aztec teams have been very responsive and helpful through Discord.

  • We had problems while setting up the local development environment for Aleo programs. This ended up being a missing library in the Arch Linux package manager that was crashing during the build of the cargo crates. To solve this, we created a reusable devcontainer that ensures portability to any system that supports Docker.

  • We encountered problems due to a bug in the Leo CLI that was failing when deploying programs. We resolved this by building the source from an older commit (913edb322dba0a49ddc0551a28aada7090f46ee9) and successfully managed to deploy on Aleo. The Probable HQ team pushed a fix for that bug during Saturday night leo v2.7.1

  • We encountered a bug with the Aztec Docker setup on Linux systems. We fixed it by editing the ~/.aztec/bin/aztec-nargo bash script and hardcoding the permissions on line 28, using --user 0:0 instead of --user (id−u):(id -u) ->
    (id−u):(id -g)
    .

Tracks Applied (4)

ZK Hack Berlin Winners

Best privacy-preserving Defi app on Aleo

Aleo

Grand Prize: Best Overall Aztec Testnet Project

Aztec

Aztec

"Builder's Choice" Grant

Aztec

Aztec

Technologies used

Discussion

Builders also viewed

See more projects on Devfolio