Optimistic Validity Proof
Optimistic validity proofs are the core concept of Safenet, which enables the centralized world's speed and convenience with the decentralized world's security and self-custody.
They ensure that transactions are fast and gas-efficient in the vast majority of cases (the happy path) while still providing security guarantees. Only in rare dispute cases does the system return to a slow and gas-intense process.
Optimistic validity proofs work similarly to slashing (opens in a new tab) in proof-of-stake networks. The processors risk losing their stake or pre-funded funds when they process invalid transactions. The validator risks losing their collateral when they challenge valid transactions.
Effects on transaction speed and gas efficiency
- A Safenet transaction's fulfillment is always fast and gas-efficient, because neither the processor nor the liquidity provider have the incentive to send out funds to a user that they would not receive back (and the processor does not want to lose its stakes).
- The settlement is gas-efficient but slightly slower, as it has a challenge delay, in which a validator can challenge the settlement request. It is gas-efficient, as the processor does not have to send a correctness proof (attestation) initially (but is free to do so).
- Only a challenged settlement is gas-intense and slow. When a validator challenges the settlement request, the processor has to send an attestation. The attestation has to be sent from the spend chain to the debit chain with a cross-chain bridge, which is costly and slow.
Economic incentives
Optimistic validity proofs build on the following economic incentives:
- The processor has an incentive to process transactions correctly, as they risk losing funds when they process invalid transactions.
- The stake of the processor secures the liquidity provider.
- The validator has an incentive to challenge invalid transactions, as they can earn a fee. They have an incentive not to challenge valid transactions, as they risk losing funds if the transaction is valid.