Adds borrower and repayer facets to the Liquidity Pool
Track outstandingLends: Amount in state for checkPoolBalance invariant
Track PoolMetrics like cumulative borrows, repays, and fees
Security Considerations
Handles payment allocations, but is able to do so synchronously using a temporary seats provided by the callers.
Scaling Considerations
Makes a vstorage writes for each borrow and repay.
Documentation Considerations
Updates code comments for maintainers.
Testing Considerations
Tests use test-only methods on the createFacet to simulate fees from a borrow/repay sequence. Tests ensure zcf.atomicRearrange() in .borrow() and .repay() will not fail and trigger zcf.shutdownWithFailure().
refs: #10390
Description
borrower
andrepayer
facets to theLiquidity Pool
outstandingLends: Amount
in state forcheckPoolBalance
invariantPoolMetrics
like cumulative borrows, repays, and feesSecurity Considerations
Handles payment allocations, but is able to do so synchronously using a temporary seats provided by the callers.
Scaling Considerations
Makes a vstorage writes for each borrow and repay.
Documentation Considerations
Updates code comments for maintainers.
Testing Considerations
Tests use test-only methods on the createFacet to simulate fees from a borrow/repay sequence. Tests ensure
zcf.atomicRearrange()
in.borrow()
and.repay()
will not fail and triggerzcf.shutdownWithFailure()
.Upgrade Considerations
None, unreleased