Secured Finance logo

Secured Finance USDFC EIP-3009 Update Security Review Report

August 2025

Overview

This report covers the security review for Secured Finance, the issuer of the USDFC stablecoin, a USD-pegged stablecoin on Filecoin Network. This review covered an incremental update introducing EIP-3009.

Our security assessment was a full review of the updates, spanning a total of 3 days. During our review, we did not identify any major or minor severity vulnerabilities.

We did identify several code optimisations.

All of our reported issues were fixed by the development team and consequently validated by us. We can confidently say that the overall security and code quality have increased af ter completion of our audit.

Scope

The analyzed resources are located on:

https://github.com/Secured-Finance/stablecoin-contracts/tree/2d1400adff8d1ab50b188c08fc4715b6ec192a93

The issues described in this report were fixed in the following commit:

https://github.com/Secured-Finance/stablecoin-contracts

Commit: c819e45531d1e3dae7670d7ed897a14818135a56

Summary

Total number of findings
2

Weaknesses

This section contains the list of discovered weaknesses.

SECFIN2-1 | ECDSA SIGNATURE NORMALIZATION (LOW-S/V RANGE) NOT ENFORCED (BEST PRACTICE)

Severity:

Informational

Status:

Fixed

Path:

contracts/DebtToken.sol

Description:

Several signature recoveries rely on ecrecover without enforcing low-s (s ≤ secp256k1n/2) and strict v-range (27 or 28). This does not bypass nonce-based replay protections but deviates from common best practices and may lead to signature malleability or interoperability inconsistencies.

Affected areas include:

  • DebtToken: _recover used by permit, transferWithAuthorization, receiveWithAuthorization, and cancelAuthorization.
  • ProtocolToken: permit uses ecrecover directly without low-s/v validation.
function _recover(
    uint8 _v,
    bytes32 _r,
    bytes32 _s,
    bytes memory _typeHashAndData
) internal view returns (address) {
    bytes32 digest = keccak256(
        abi.encodePacked("\x19\x01", domainSeparator(), keccak256(_typeHashAndData))
    );
    address recovered = ecrecover(digest, _v, _r, _s);
    require(recovered != address(0), "EIP712: invalid signature");
    return recovered;
}

Remediation:

Prefer ECDSA.recover from OpenZeppelin, which enforces low-s and validates v. Alternatively, add explicit checks:

  • require(uint256(s) <= SECP256K1N_HALF)
  • require(v == 27 || v == 28)

SECFIN2-2 | CODE CLARITY INCONSISTENCIES (NO-OP STATEMENT, MISSING EMIT)

Severity:

Informational

Status:

Fixed

Description:

Minor clarity issues reduce readability and can hinder observability:

  • No-op statement in BorrowerOperations.openTrove (a standalone vars.debtTokenFee; has no effect).
  • Missing emit keyword on event emissions:
    • ActivePool.increaseDebt/decreaseDebt call ActivePoolDebtUpdated(debt) without emit.
    • SortedTroves._remove calls NodeRemoved(_id) without emit, while the interface defines it as an event. While not security-impacting, these patterns can cause confusion, compilation issues.

Remediation:

  • Remove the no-op line in BorrowerOperations.openTrove
  • Add emit to all event emissions (e.g., emit ActivePoolDebtUpdated(debt), emit NodeRemoved(_id))

Table of contents