Docs/Testingv1.0 · Coston2

04 / Verification

Testing

A test suite spanning stateful invariants, integrations, fuzzing, and cross-language signing.

LAST UPDATED
14 AUG 2026

Test Summary - CreditGateVault

Total tests: 191 Foundry + 44 Python · 19 Solidity suites · Failures: 0 · Skipped: 0

Freshly verified with:

bash
forge test --summary

The suite runs with solc 0.8.35 and IR optimization, matching the replacement Coston2 deployment build. IR optimization keeps CreditGateVault below the EIP-170 runtime code-size limit.

Coverage Areas

  • Loan lifecycle: collateral deposit, eligibility attestation, draw, FDC repayment, close, and withdrawal.
  • Cross-chain settlement: borrower XRPL source snapshot, immutable protocol receiver, exact memo commitment, replay prevention, atomic settlement-agent USDT0 transfer, and insufficient-settlement regression cases.
  • Lender accounting: liquidity shares, available-liquidity guards, outstanding principal, protocol reserve exclusion, and auction escrow exclusion.
  • Liquidation: deadline and health-factor triggers, fresh-oracle enforcement, bid monotonicity, principal floor, no-bid recovery, and paused emergency operations.
  • Security: EIP-191 signature checks, reentrancy, malicious-token callback, nonce/revocation handling, FTSO edge cases, state-machine constraints, and fuzz invariants.
  • Integrations: Go and Python TEE signing compatibility, FDC proof fixture shape, CreditScoreSBT updates, ContractRegistry refreshes, and frontend ABI coverage.

Suite Breakdown

SuiteTests
CreditGateVaultTest69
CreditGateVaultAuctionTest5
CreditGateVaultEdgeCaseTest15
CreditGateVaultFDCFixtureTest4
CreditGateVaultGracePeriodTest5
CreditGateVaultInvariantTest8
CreditGateVaultLTVTest11
CreditGateVaultRealReentrancyTest1
CreditGateVaultOwnershipTest4
CreditGateVaultProtocolReserveTest13
CreditGateVaultReentrancyAttackTest2
CreditGateVaultRegistryTest4
CreditGateVaultReputationTest5
CreditGateVaultSecurityEdgeTest5
CreditGateVaultTeeCompatTest4
CreditGateVaultTriggerTest9
CreditGateVaultViewsTest15
CreditScoreSBTTest9
SBTVaultIntegrationTest3

Run forge test --summary for the authoritative breakdown.