House Protocol E2E tests#778
Open
zzzuhaibmohd wants to merge 73 commits intoInverterNetwork:experimental/perfrom
Open
House Protocol E2E tests#778zzzuhaibmohd wants to merge 73 commits intoInverterNetwork:experimental/perfrom
zzzuhaibmohd wants to merge 73 commits intoInverterNetwork:experimental/perfrom
Conversation
FHieser
reviewed
Oct 1, 2025
| vm.stopPrank(); | ||
|
|
||
| //-------------------------------------------------------------------------------- | ||
| // Test 5: Repayment |
Author
There was a problem hiding this comment.
Added a Buy And Borrow Test
Contributor
There was a problem hiding this comment.
buyAndBorrow is missing here
Also I would like to see the fee system in action
Author
There was a problem hiding this comment.
Added both borrow and buyAndBorrow test with fee system
FHieser
reviewed
Oct 2, 2025
| uint collateralDeposited = 50 ether; | ||
| uint collateralReceived = userBalanceAfter - userBalanceBefore; | ||
| // Total Fees Paid = buyFee + borrowFee | ||
| uint totalFeesPaid = collateralDeposited - collateralReceived; |
Contributor
There was a problem hiding this comment.
The fee calculation doesnt work anymore if an LTV is involved
Author
There was a problem hiding this comment.
I have made the fix to handle this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Implemented comprehensive end-to-end testing for the House Protocol Lending Facility that validates the complete borrowing lifecycle with dynamic fee calculation and proper integration with the bonding curve funding manager.
File to Review
https://github.com/33Audits/inverter-contracts/blob/feat/house-protocol-e2e-tests/test/e2e/logicModule/LM_PC_Lending_Facility_v1_E2E.t.sol
Key Changes
LM_PC_Lending_Facility_v1_E2E.t.solcovering the full lending facility lifecycleTest Coverage
Setup and Configuration
Bonding Curve Integration
Borrowing Flow
Repayment Flow
Test Scenarios
The E2E test ensures the lending facility operates correctly within the complete Inverter ecosystem, validating all integration points and state management requirements.