Problem
None of the StepFi contracts implement a reentrancy
guard. A malicious contract could call back into
a StepFi contract during execution, potentially
draining funds or corrupting state.
Context
Reentrancy is one of the most common and damaging
smart contract vulnerabilities. Soroban contracts
can call other contracts and those contracts can
call back. Without a guard this is exploitable.
What To Build
-
Create a ReentrancyGuard in each contract.
-
Apply to ALL mutating functions in all 5 contracts.
-
Write tests that verify reentrancy is rejected.
Files To Touch
All 5 contract lib.rs, storage.rs, errors.rs, tests.rs files
Acceptance Criteria
Mandatory Checks Before PR
Problem
None of the StepFi contracts implement a reentrancy
guard. A malicious contract could call back into
a StepFi contract during execution, potentially
draining funds or corrupting state.
Context
Reentrancy is one of the most common and damaging
smart contract vulnerabilities. Soroban contracts
can call other contracts and those contracts can
call back. Without a guard this is exploitable.
What To Build
Create a ReentrancyGuard in each contract.
Apply to ALL mutating functions in all 5 contracts.
Write tests that verify reentrancy is rejected.
Files To Touch
All 5 contract lib.rs, storage.rs, errors.rs, tests.rs files
Acceptance Criteria
Mandatory Checks Before PR