We appreciate ChainSecurity for very deep and thoughtful analysis!
Curve implements a standard library of reusable modules and interfaces for Vyper smart contract development. It provides ERC-20 and ERC-4626 interfaces, shared fixed-point constants, safe ERC-20 transfer and approval helpers, a saturating subtraction helper, and an exponential moving average (EMA) module with a fixed set of configurable EMAs.
The most critical subjects covered in our audit are the functional correctness of the helpers, interface fidelity to the canonical specifications, and consistency of revert and return semantics so that downstream contracts can rely on identical behavior. The only finding of low severity concerned string return bounds in the ERC-20 interface, which could make calls to tokens with longer names or symbols revert; it was corrected, see Bounds for Interfaces Returning String.
The general subjects covered are arithmetic overflow, event handling and code clarity. All informational findings were corrected, including EMA input bounds that prevent large values from blocking reads, see Large EMA Values Can Revert Reads. Except for the EMA module, no tests were provided for the library, and we recommend building a comprehensive test suite.
The reviewed codebase provides a high level of security. Integrators remain responsible for handling tokens with uncommon behaviors such as fee-on-transfer, rebasing or callbacks.
It is important to note that security audits are time-boxed and cannot uncover all vulnerabilities. They complement but don’t replace other vital measures to secure a project.