Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# TODO: Hostile reentrancy fault-injection suite

- [ ] Create `quicklendx-contracts/src/test_reentrancy_fault_injection.rs`
- [ ] Implement test harness + HostileToken contract(s) or helper pattern
- [ ] Implement hostile token behavior: re-enter QuickLendX during token transfer
- [ ] Drive guarded entrypoints:
- [ ] accept_bid_and_fund
- [ ] process_partial_payment
- [ ] settle_invoice
- [ ] refund_escrow
- [ ] release_escrow
- [ ] Assertions: any re-entry fails pre-mutation with `OperationNotAllowed`
- [ ] Edge cases: deeply nested + alternating entrypoints
- [ ] Add security doc comments + P0 classification
- [ ] Create `docs/reentrancy-fault-injection.md`
- [ ] Explain guard mechanism and hostile token approach
- [ ] Document P0 note
- [x] Create `quicklendx-contracts/src/test_reentrancy_fault_injection.rs`
- [x] Implement test harness + HostileToken contract(s) or helper pattern
- [x] Implement hostile token behavior: re-enter QuickLendX during token transfer
- [x] Drive guarded entrypoints:
- [x] accept_bid_and_fund
- [x] process_partial_payment
- [x] settle_invoice
- [x] refund_escrow
- [x] release_escrow
- [x] Assertions: any re-entry fails pre-mutation with `OperationNotAllowed`
- [x] Edge cases: deeply nested + alternating entrypoints
- [x] Add security doc comments + P0 classification
- [x] Create `docs/reentrancy-fault-injection.md`
- [x] Explain guard mechanism and hostile token approach
- [x] Document P0 note
- [ ] Run `cargo test test_reentrancy_fault_injection`
- [ ] Fix compile/test failures until green

60 changes: 60 additions & 0 deletions quicklendx-contracts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions quicklendx-contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ mod test_profit_fee;
// mod test_refund;
// #[cfg(all(test, feature = "legacy-tests"))]
// mod test_storage;
#[cfg(all(test, feature = "legacy-tests"))]
mod test_reentrancy;
#[cfg(all(test, feature = "legacy-tests"))]
mod test_reentrancy_fault_injection;
#[cfg(test)]
mod test_storage_key_layout;
#[cfg(all(test, feature = "legacy-tests"))]
Expand Down
Loading