clober-dex / coupon-finance

Coupon Finance Solidity Contracts
Other
1 stars 0 forks source link

Inconsistent return coupon order between BondPositionLibrary and LoanPositionLibrary #108

Closed detectivekim closed 1 year ago

detectivekim commented 1 year ago

Details

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.