On-Chain Code Integrity
On-chain code integrity refers to the state where the code residing on the blockchain is exactly what it claims to be and has not been altered or tampered with. This integrity is guaranteed by the consensus mechanism of the blockchain, which prevents unauthorized modifications to existing data.
However, the integrity of the logic depends on the developers and the initial deployment. If a contract is not immutable ⎊ for example, if it uses a proxy pattern that allows for upgrades ⎊ the integrity can be compromised if the upgrade mechanism is hijacked.
Maintaining code integrity is crucial for financial derivatives, where the rules of the contract define the value and settlement of the assets. Ensuring that the code remains unchanged is a primary concern for risk management and regulatory compliance.
It requires strict control over administrative keys and upgrade processes.