The logic in the repositories provided to Trail of Bits contains a significant amount of duplicated code.
This development practice increases the risk that new bugs will be introduced into the system, as bug fixes must be copied and pasted into files across the system.
Short term, use inheritance to allow code to be reused across contracts.
Changes to one inherited contract will be applied to all files without requiring developers to copy and paste them.
Long term, minimize the amount of manual copying and pasting required to apply changes made to one file to other files.
- ToB Audit Advanced Blockchain Finding 4
- Patching
- Duplicated Code
- Error-prone
- Code Reuse
- Inheritance