Bid for NFT with Credit

Users can Bid for NFT's on the ParaSpace marketplace with credit for any tokens of a supported collection. The mechanics loosely match those of Leveraged Buys of NFT's with a couple of important differences.
As a brief reminder, we calculate the amount of credit ​
CRCR
a user will control at a given time
CR=i=1i(CollateraliinETH×LTVi) +TotalERC20inETHCR = \sum_{i=1}^i (Collateral_i \: in \: ETH \: \times \: LTV_i) \ + {Total \: ERC20 \: in \: ETH \:}
where
CollateraliCollateral_i
​ represents the NFT's and ERC-20 tokens the user has supplied to the ParaSpace protocol.
A user then draws from
CRCR
​ available in their account upon clicking on "Make Offer with Credit" to make a leveraged bid on an NFT:
CRbidCR_{bid}
. Note that at this stage if this is the bidder's first transaction on ParaSpace they must first approve the spend of Wrapped ETH (WETH) from their account and likewise sign a transaction which gives ParaSpace the authority to transfer the same when/if the NFT owner accepts the offer. Other than gas fees, however, no tokens change hands unless the NFT owner accepts the bid.
If the NFT owner subsequently accepts the Bid of
CRbidCR_{bid}
, ParaSpace will then draw the WETH credit from the buyer's account and transfer it to the seller. Instead of delivering the NFT directly to the buyer, however, ParaSpace immediately collateralizes it on the buyer's behalf and delivers an nToken ERC-721 token to the buyer's wallet. This nToken carries the same metadata as the original NFT and represents the user's claim to the token collateralized on the ParaSpace protocol.
Following the transaction the buyer will have the following credit available in their account:
CRnew=CRCRbid+FloorNFT×LTVNFTCR_{new} = CR - CR_{bid} + Floor_{NFT} \times LTV_{NFT}
The user may keep the NFT collateralized for further borrowing or may use their nToken to withdraw the NFT as long as its withdrawal does not force the user's Health Factor below 1.