nocturne
Nocturne enables cross-chain trading of RWA tokens while keeping your holdings private.
Problem Statement
Nocturne is a private-token platform that brings real-world assets on-chain while keeping user balances fully hidden. Users can buy and trade tokenized shares of stocks or other assets without ever revealing how much they own.To create these assets, Nocturne buys the real stock and mints a private token that represents it. Then Users interact only with these private tokens, enjoying the value of the underlying asset while keeping their holdings confidential.Nocturne works across multiple blockchains. Thanks to LayerZero, users can invest from any supported chain—Base, Arbitrum, and more—while the privacy engine stays consistent everywhere.Under the hood, all sensitive operations run inside iExec’s confidential computing. The TEE handles encrypted amounts, updates balances privately, and guarantees both security and correctness.The result is simple: connect your wallet, explore assets, and invest privately, securely, and on any chain.
Solution
We built Nocturne as a cross-chain private-asset flow. The dApp frontend encrypts the user’s trade amount in the browser with Nocturne’s public key, then calls a PrivateERC20 contract on the user’s chain with (stockId, encryptedAmount). That contract uses LayerZero endpoints to send an omnichain message to Arbitrum, where an iExec TEE iApp is triggered.Inside the TEE we decrypt the amount, read the encrypted balances, update them, then re-encrypt and send the new encrypted balances back on-chain. A second LayerZero hop delivers this payload to the original PrivateERC20, which emits an encrypted BalanceUpdated event that the frontend decodes to show the user their new private balance.The “hacky” bit is that balances are never stored in plaintext: we only move ciphertext through LayerZero and contracts, and do all decryption/re-encryption inside the iExec enclave, effectively giving us private, omnichain stock exposure with standard ERC20 + messaging primitives.We developed the whole system using Hardhat 3, leveraging its new solidity testing framework and multi-chain test environments to simulate cross-chain flows end-to-end.
Hackathon
ETHGlobal Buenos Aires
2025
Contributors
- Le-Caignec
14 contributions