Neutrl

Neutrl: NusdRedemption.sol

Cantina Security Report

Organization

@Neutrl

Engagement Type

Cantina Solo

Period

-

Researchers


Findings

Informational

3 findings

2 fixed

1 acknowledged

Gas Optimizations

1 findings

0 fixed

1 acknowledged


Informational3 findings

  1. Redundancies

    State

    Fixed

    PR #72

    Severity

    Severity: Informational

    Submitted by

    Kurt Barry


    Description and Recommendation

    NusdRedemption.sol#L32: The MerkleRootNotSet() error is unused and can be removed.

  2. Indexing of message Parameter in Events

    State

    Fixed

    PR #72

    Severity

    Severity: Informational

    Submitted by

    Kurt Barry


    Description

    The message parameter is indexed in the MessageSigned() event but not in the MessageSet() event.

    Recommendation

    No action is strictly necessary, but consider whether the indexing status of this parameter should be consistent.

  3. Partial Redemptions Are Not Possible

    State

    Acknowledged

    Severity

    Severity: Informational

    Submitted by

    Kurt Barry


    Description

    The redeem() function always tries to redeem the caller's full balance. This may not be possible if the asset reserve lacks sufficient USDC. There is no way for the caller to request a partial redemption; instead the caller must transfer away some portion of the NUSD they hold and try again.

    Recommendation

    Consider allowing partial redemption, either by automatically partially redeeming if full redemption is not possible, or adding a parameter the caller may specify to indicate how much of their NUSD they wish to redeem.

Gas Optimizations1 finding

  1. signedAt Mapping Is Unnecessary

    State

    Acknowledged

    Severity

    Severity: Gas optimization

    Submitted by

    Kurt Barry


    Description

    The signedAt mapping is written to but never used in contract logic.

    Recommendation

    Eliminate this mapping to reduce the gas cost of the signMessage() function.