Skip to content

Code4rena

Maple Finance contest

Every publicly disclosed report for Maple Finance contest and what kind of bugs they were.

disclosed reports
8
most reported class
Business logic
bug classes found
3
first disclosure
2021
Find Maple Finance contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Maple Finance contest chose to make public.

Business logic

Incorrect implementation of Lender can result in lost tokens

The _sendFee function in MapleLoanInternals decodes the return data from an external call as an address without checking its length. If the called function returns bytes data, abi.decode interprets the length prefix (0x20) as the address, causing tokens to be sent to the wrong destination and lost.

Maple Finance contest

Medium
Smart contracts

Processes refinance operations may call malicious code by re-created refinancer contract

A borrower could propose a refinancer contract that appears benign but can be destroyed and re-created at the same address with malicious code before the lender accepts the new terms. The lender's call to acceptNewTerms then delegatecalls into the malicious code, potentially causing devastating consequences for the loan.

Maple Finance contest

Medium
Access control

Anyone can call closeLoan() to close the loan

The closeLoan function in MapleLoan.sol lacks an authorization check, allowing any caller to close a loan after it has been funded. An attacker could grief the borrower and lender by forcing early closure, potentially causing gas costs and platform fee losses.

Maple Finance contest

Medium
Business logic

Unsafe implementation of fundLoan() allows attacker to steal collateral from an unfunded loan

The fundLoan function reads fee and recipient addresses from a user-supplied lender contract, so an attacker can set very high fees that reduce drawable funds to near zero while sending the fees back to themselves. The borrower then cannot draw funds or remove collateral, and after the grace period the attacker can repossess the collateral.

Maple Finance contest

Medium
Access control

makePayment() Lack of access control allows malicious lender to retrieve a large portion of the funds earlier, making the borrower suffer fund loss

The makePayment function lacked access control, allowing any caller to repay the loan using the contract's drawable funds. A malicious lender could call it repeatedly after funding to reclaim most of their principal early, leaving the borrower owing interest on unused funds or facing collateral loss.

Maple Finance contest

High
Business logic

Potential huge arbitrage opportunities / MPL price decrease

When a borrower defaults, the protocol sells a large amount of pool tokens for a single asset at once, which can push the MPT token price down. This creates an arbitrage opportunity that a borrower could exploit by not repaying the loan.

Maple Finance contest

Medium
Business logic

Loans of tokens with >18 decimals can result in incorrect collateral calculation

The collateral calculation in a lending protocol incorrectly assumes collateral tokens have at most 18 decimals, so a token with more decimals causes the required collateral to be computed as zero. An attacker could then take a loan with no collateral and default, leaving the pool with a loss.

Maple Finance contest

Medium