Reports

Smart Contract Security Assessment

Resupply CurveLend Operator

The CurveLend Operator is a factory model for lending stables (crvUSD) into Curve lending markets (ERC-4626 vaults).

3
Issues
0
C/H/M
Period
Sep 09, 2025 - Sep 10, 2025
Auditors
HHK, adriro

Review Summary

Protocol Overview

The CurveLend Operator is a factory model for lending stables (crvUSD) into Curve lending markets (ERC-4626 vaults).

Protocol
Resupply
Timeline
Sep 09, 2025 - Sep 10, 2025
Audit Team
HHK, adriro

Scope

This audit covers 2 smart contracts totaling approximately 120 lines of code across 1.5 days of review.

Overall Assessment

The protocol presents a straightforward design for managing crvUSD allocation in a planned and permissioned fashion through its factory and operator architecture.

Evaluation Matrix

access control

mathematics

complexity

libraries

decentralization

code stability

documentation

monitoring

testing

Key Findings

Findings Summary

0
Critical
0
High
0
Medium
1
Low
2
Informational
0
Gas
L-1 Finding

L-1: Limit reduction amount

Low

Description:

The reduceAmount() function can be used to withdraw an arbitrary amount of assets from the market permissionlessly. The implementation refunds the factory only the difference with respect to the limit, and then returns any leftovers to the vault.

This withdrawal and redeposit cycle could have a negative impact on the operator's assets if the vault implements entry and/or exit fees, or due to rounding issues during share conversion, depending on the attacker's capacity to inflate share value.

Impact:

Low.

Recommendation:

Validate the reduction amount is within the intended difference (i.e., amount <= mintedAmount - mintLimit).

Developer Response:

I-1 Finding

I-1: Consider using `previewRedeem()` to measure the operator's equity

Informational

Summary:

The implementation utilizes convertToAssets() to calculate the total assets held, which may not accurately reflect the actual effects of a share redemption.

Description:

Impact:

Informational.

Recommendation:

Change convertToAssets() for previewRedeem().

Developer Response:

I-2 Finding

I-2: Add a `shutdown` option when removing a market operator

Informational

Description:

When removing or replacing a market operator through addMarketOperator() or removeMarketOperator() the operator then needs to be called manually, once to reset the mint limit back to 0 through setMintLimit(), then to reimburse borrowed funds through reduceAmount() and finally withdraw_profit() to remove profits.

While this could batched through a script and gnosis safe interface, it might be easier and less prone to errors to directly update the functions.

To simplify DAO operations during operator removal/replacement, consider adding a bool shutdown parameter to addMarketOperator() and removeMarketOperator(), if set to true then call setMintLimit(0), reduceAmount(mintedAmount()) and withdraw_profit() on the operator.

Inside the operator contract, consider allowing setMintLimit() to be called by the factory and not only the owner.

Impact:

Informational.

Recommendation:

Implement the suggested changes.

Developer Response:

Acknowledged.

Final Remarks

No major issues were detected during the review. Auditors recommend exercising caution when interacting with vaults susceptible to share price manipulation, to avoid sandwich attacks or precision issues while deploying capital.

Methodology

Severity Classification

Critical

Immediate threat to user funds or protocol integrity

Direct loss of funds, protocol compromise

High

Significant security risk requiring urgent attention

Potential fund loss, major functionality disruption

Medium

Important issue that should be addressed

Limited fund risk, functionality concerns

Low

Minor issue with minimal impact

Best practice violations, minor inefficiencies

Gas

Findings that improve gas efficiency

Increased transaction costs

Informational

Code quality and best practice recommendations

Reduced maintainability and readability