Context
contracts/flashloan-token/ exists. Complete it with a reentrancy guard implementation and demonstrate both vulnerable and protected patterns.
Work
Acceptance criteria
- Attack contract successfully drains
flash_loan_unsafe in test
flash_loan_safe is not drainable
sanctifier analyze finding count: 0 on safe, ≥1 on unsafe
Context
contracts/flashloan-token/exists. Complete it with a reentrancy guard implementation and demonstrate both vulnerable and protected patterns.Work
flash_loan_unsafe(amount, callback_contract)without reentrancy protection (triggers S-reentrancy)flash_loan_safe(amount, callback_contract)using the Reentrancy Guardsanctifier analyzecatching the vulnerabilityAcceptance criteria
flash_loan_unsafein testflash_loan_safeis not drainablesanctifier analyzefinding count: 0 on safe, ≥1 on unsafe