Smart Contract Risk
Failure in code, permissions, accounting or external calls.
#Risk mechanism
Executable protocol logic can create loss through faulty state transitions, arithmetic, authorization, reentrancy, unsafe token assumptions or upgrade control.
#Stress conditions
- Unexpected ERC-20 behavior or paused transfer.
- Incorrect multiplier or decimal normalization.
- Privilege compromise.
- Reentrant or reordered external call.
- Settlement executed twice or against inconsistent state.
#Control principles
- Keep modules narrow and invariants testable.
- Minimize and disclose privileged authority.
- Use checks-effects-interactions and safe token handling.
- Test rounding and terminal boundaries adversarially.
- Make accounting reconstructable from onchain state.