[test] Extend Lending Regression Tests
This change (based on !2846 (merged)) will remain in draft until the following PRs are in develop
and a manual rebase can occur:
After this PR is merged we will proceed with the following sequencing:
- Code fixes for
TODO
comments in current regression tests:- Handle derived asset targets
- Handle affiliate fees (and add to quote API)
- Fixes for TOR manipulation - use max slip instead of median, account for slip in TOR conversion in loan handler
- Send refund to originating address instead of module on existing loan repay when TOR is disabled
- Avoid over-solvent vaults (breaking invariant) when inbound loan amount is over dust but not enough to refund (just donate to pool)
- Send error in quote when inbound amount less than 3x inbound gas to somewhat mitigate likelihood of the case above
- Finish incomplete regression tests and add remaining scenarios