Privacy Wallet · Technical Docs

Transaction flow

Withdrawal: Execute phase

Finalizing a prepared withdrawal by distributing funds to the recipient and relayer.

Verification

  • Existence. The PreparedTx PDA must exist for the specified nonce.
  • Replay protection. An ExecutedFlag for the same nonce must not already exist.
  • Expiry. The nonce must still be within its validity window.

Fund movements

  • Recipient payment. The pool pays publicAmount - fee to the external recipient.
  • Relayer payment. The pool pays the percentage fee plus gas buffer to the relayer.

Cleanup

  • Execution marker. An ExecutedFlag PDA is created to mark the nonce as consumed.
  • PreparedTx closure. The PreparedTx PDA is closed and rent returned.