Pulse

Accounting Model

On a normal public DEX, everyone can inspect the chain and see what all wallets hold and do: balances, liquidity positions, deposits, withdrawals, trading sizes and strategies.

Pulse works differently, by running a DEX without publishing user's balances to a public ledger. This is made possible by state-of-the-art Zero Knowledge cryptography.

Why users care

Privacy is not just about hiding, it's about keeping your edge. This contrasts with public DEXs, where every position and trade can become a signal for others to copy, target, or trade against.

Private balances are the default in traditional finance. Pulse brings that same basic expectation to permissionless on-chain trading.

Private balances

Pulse does not keep one public account balance per user. Instead, it tracks balances as private objects that only their owner can spend. The public chain stores only commitments to those balances, while the private balance data needed to understand and spend them is kept off-chain.

Each private balance has an owner, an id, can contain up to two assets with different amounts, and has optional batcher instructions.

When a private balance is used, it is consumed and replaced with one or more new private balances. This is closer to Bitcoin and Cardano's UTxO model than to a single account number that simply goes up or down.

Why Pulse built this model

Pulse originally tried building directly on Midnight's native shielded notes. They worked well for simple private transfers, but were too limiting for the more complex transactions needed by DEXs.

A Pulse private balance can hold up to two assets. This lets Pulse represent both sides of a liquidity position with a single object, instead of forcing each side into separate balances.

A Pulse private balance can also carry batcher instructions, allowing swaps to be chained with other actions so the user can specify complex DeFi interactions with only a single signature.

For now, these private balances are designed for the Pulse application and contract rather than as a general wallet standard.

Preventing double spending

The Pulse contract ensures that a private balance is real and has not already been used. It does that with a public fingerprint called a nullifier.

When a private balance is spent, Pulse publishes its nullifier. If the owner tries to spend the same balance again, the same nullifier appears, the contract sees that it was already used, and the transaction fails.

The important part is that this public fingerprint blocks reused balances without revealing any private data of that balance: who owned it, what assets it contained, or which new output balances belong to the same user.