The function purchaseLiquidationAuctionNFT() incorrectly sets maxDebtCached to the full debt when the auctioned NFT is the user's last collateral, causing the entire payment to be treated as excess and a 10% liquidation penalty to be taken from the whole amount. This means the user loses 10% of the auction price instead of 10% of the excess over debt, resulting in fund loss.
The Papr Controller contract uses safeTransferFrom to move Papr tokens out of itself, but it never approves those transfers, so the calls revert. This traps auction proceeds in the contract and prevents the owner or DAO from collecting fees.
The protocol's functions for removing collateral, starting a liquidation auction, and purchasing an auctioned NFT lacked reentrancy protection, allowing a malicious contract to reenter during NFT transfer callbacks. An attacker could borrow the maximum amount, remove most collateral, auction the last NFT, buy it, and have remaining debt wiped, stealing funds.
The buyAndReduceDebt function in PaprController collects the swap fee from the contract itself rather than from the caller, because it uses transfer instead of transferFrom. This causes the transaction to revert when a fee is set, and could allow any mistakenly sent underlying tokens to be transferred out.
An attacker can front-run a user's debt repayment transaction by repaying a tiny amount of that user's debt first, causing the user's transaction to fail with an underflow error. This prevents the user from fully repaying their debt.
When a vault's last collateral was auctioned, the contract wrote off the remaining debt as a shortfall even though another collateral was still being auctioned. The borrower could then receive the proceeds of the second auction as a payout instead of those funds covering the written-off debt.
The contract only checks whether a collateral is allowed when adding it, but not when increasing debt. An attacker could use a disabled collateral to mint debt.
The buyAndReduceDebt function sends swapped papr tokens to the account address but burns papr tokens from the caller, so the caller pays twice while the account receives the tokens and debt reduction. An attacker could cause a caller to lose funds if the caller has enough papr tokens to burn.
The PaprController contract lacks a deadline parameter for swaps on Uniswap V3, so pending transactions can be executed much later at outdated prices. An attacker, such as an MEV bot, could exploit this to sandwich the transaction and profit from the user's loss.
The liquidation purchase function decided whether an NFT was a vault's last collateral by checking whether the cached collateral value was zero, rather than checking the NFT count. If the external price oracle returned zero while the vault still held NFTs, the code would treat it as the last collateral and wipe the remaining debt, letting the owner withdraw the other NFTs for free.
The protocol allowed users to borrow up to the maximum loan-to-value (LTV) ratio, but positions became liquidatable as soon as debt reached that same maximum LTV. An attacker could borrow the maximum amount and then immediately liquidate the position in the same block, causing the user to lose funds and potentially creating bad debt for the protocol.
The PaprController contract's onERC721Received hook incorrectly uses the first argument (the caller) as the token owner instead of the second argument (the actual owner). When an approved address or operator transfers an NFT to the contract, the NFT is credited to the wrong vault, causing the real owner to lose their collateral.
The repayAndCloseLoan function does not check that a loan has been matched with a lender, so calling it on an unmatched loan causes the borrower to transfer a large interest amount and the minimum loan amount to the zero address. A borrower who has approved the contract could lose funds if they call this function instead of closeLoan.
The mint function for the BorrowTicket NFT uses _mint instead of _safeMint, so if the recipient is a contract that cannot handle ERC721 tokens, the NFT may become stuck and the user's funds could be lost. An attacker could exploit this by setting a contract address that cannot receive NFTs as the mintBorrowTicketTo parameter, causing the ticket to be frozen.
The buyout check in the NFT loan facilitator used integer division to compute the required improvement, so when the previous interest rate was below 10 and the required improvement rate was 100, rounding down let a new lender match the existing rate instead of improving it. An attacker could therefore buy out a loan without offering better terms.
A borrower could lend to their own loan and then, via a reentrant call during the buyout process, repay and close the loan before the lend ticket is transferred to the new lender. This allowed the borrower to keep the NFT, the loan amount, and accrued interest, effectively stealing funds from the new lender.
The current loan owner can re-enter the lend function during a buyout because the loan asset token triggers a callback, allowing them to overwrite the loan terms with unfavourable values. A lender attempting to buy out the loan could end up with a manipulated loan that cannot be corrected.
The minimum loan amount set by a borrower is interpreted as the pre-fee amount, so if the admin increases the origination fee after the loan is created, the borrower receives less than the intended minimum. This could leave the borrower with insufficient funds for their needs.
The closeLoan function transfers a collateral NFT to an arbitrary address using transferFrom, which does not check if the recipient can handle ERC721 tokens. If the recipient is a contract that cannot receive NFTs, the token becomes permanently stuck.
The protocol did not account for ERC20 tokens that charge a fee on transfer, so when a loan was funded with such a token, the second transfer could fail or the facilitator could lose funds. An attacker could not directly exploit this, but it could break core loan functionality or cause a loss for the lender or borrower.
An attacker who is a lender can use an ERC777 token as the loan asset to make buyout transactions revert, preventing other lenders from buying out the loan. The attacker can also block repayment, potentially leading to default and seizure of the borrower's collateral.
The loan amount in the NFT loan facilitator acts as a minimum, so a lender can match a borrower's requested loan with a much larger amount. The borrower then owes interest on the full larger amount, potentially forcing them to pay far more interest than intended or risk losing their collateral.
PC
Papr contest
High
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.