The BondPositionLibrary and LoanPositionLibrary have reversed return parameters: the former returns (mintCoupons, burnCoupons) while the latter returns (burnCoupons, mintCoupons).
This unnecessarily complicates readability when comparing the lender and borrower flows.
Mitigation
Keep the order consistent: recommend changing LoanPositionLibrary to match the order of BondPositionLibrary.
Details
The
BondPositionLibrary
andLoanPositionLibrary
have reversed return parameters: the former returns(mintCoupons, burnCoupons)
while the latter returns(burnCoupons, mintCoupons)
. This unnecessarily complicates readability when comparing the lender and borrower flows.Mitigation
Keep the order consistent: recommend changing
LoanPositionLibrary
to match the order ofBondPositionLibrary
.