defirisk.co
rubric v1.7.0

Reentrancy guard on external-calling functions

SUNSwap (sun.io)'s assessment for RD-F-014 — scored green on the v1.7.0 rubric. The evidence below is the curator's reasoning for this score.

Evidence summary #

V2 Pair implements custom lock mutex (uint private unlocked=1) applied to mint/burn/swap/skim/sync — standard Uniswap V2 reentrancy guard pattern. V4 uses flash accounting (differences settled end-of-tx) reducing reentrancy surface. V3 follows Uniswap V3 well-audited upstream pattern.

Sources #

  • GitHub
    SunswapV2Pair sourceSunswapV2Pair.sol — lock modifier (uint private unlocked=1) confirmed on mint/burn/swap/skim/syncretrieved 2026-05-17

Methodology #

Determine whether all state-mutating functions that perform external calls carry `nonReentrant` or an equivalent reentrancy guard.

See the full factor methodology and distribution across all protocols →

rubric_version v1.7.0 protocol sunswap factor RD-F-014 score green collected_at 2026-05-17 14:37:31