This paper proposes a decentralized netting protocol thatguarantees the privacy of the participants. Namely, it leverages the blockchainand its security properties to relax the trust assumptions and get rid oftrusted central parties. We prove the protocol to be optimal and we analyze its performance using a proof-of-concept implemented on top ofHyperledger Fabric.