Submitted by hihen, also found by bin2chen, rvierdiiev, and HollaDieWaldfee
The proceeds from the collateral auctions will not be used to fill the debt shortfall, but be transferred directly to the borrower.
Assume N is an allowed NFT, B is a borrower, the vault V is _vaultInfo[B][N]:
The tokens being transferred to the borrower in step 8 should be used to fill the shortfall of the vault.
Test code for PoC:
Test output:
VS Code
The debt shortfall should be recorded and accumulated when the debt is burnt directly. Fill the shortfall first in later liquidation.
Implementation code:
Jeiwan (warden) commented:
wilsoncusack (Backed) confirmed and commented:
