Logic Error
A logic error in a smart contract occurs when the code functions exactly as written, but the intended economic or functional outcome is not achieved. Unlike a coding vulnerability that involves an exploit, a logic error represents a mistake in the design or implementation of the contract's rules.
This could involve an incorrect calculation of interest rates, a flaw in the liquidation sequence, or a misconfigured governance vote. These errors are often harder to detect than traditional bugs because they do not necessarily cause the code to crash, but they can still lead to significant financial loss or protocol instability.
Addressing logic errors requires a thorough understanding of the protocol's intended design and extensive testing under various market scenarios. It is a testament to the complexity of building decentralized financial systems, where even minor oversights in logic can have catastrophic consequences for the users and the protocol itself.