Skip to content

Code4rena

Moonwell

Every publicly disclosed report for Moonwell and what kind of bugs they were.

disclosed reports
17
most reported class
Business logic
bug classes found
4
first disclosure
2023
Find Moonwell on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Moonwell chose to make public.

DoS

Malicious emissionToken could poison rewards for a market

A malicious or censorable emission token that reverts on transfer can cause all reward claims for a market to fail, permanently locking unclaimed rewards for that token. An attacker who controls such a token could prevent any user from claiming rewards.

Moonwell

Medium
Access control

TemporalGovernor can be bricked by guardian

The TemporalGovernor contract could be permanently disabled because a guardian could pause it, then execute a governance instruction to re-enable guardian pausing while still paused, and finally renounce ownership. This would leave the contract paused with no way to unpause or execute proposals.

Moonwell

Medium
Access control

fastTrackProposalExecution should only be callable when TemporalGovernor is paused

The fastTrackProposalExecution function lacked the whenPaused modifier, so the TemporalGovernor owner could queue and execute any proposal at any time without delay or voting. This bypassed the intended emergency-only use and undermined the DAO's permissionless governance process.

Moonwell

Medium
Business logic

It’s not possible to liquidate deprecated market

The liquidateBorrowAllowed function in the Moonwell Comptroller contract does not allow liquidation of deprecated markets, unlike the original Compound code. This prevents the platform from liquidating bad or deprecated markets, potentially exposing user funds to unnecessary risks.

Moonwell

Medium
Misconfiguration

Incorrect address is set as Wormhole Bridge, which breaks deploy

The Wormhole Bridge address in the deployment configuration was set to a testnet address that has no code on Base Mainnet. As a result, the TemporalGovernance contract could not execute proposals, leaving initial tokens stuck and requiring redeployment.

Moonwell

Medium
Business logic

Initial deploy won’t succeed because of too high initialMintAmount for USDC market

The deployment script hardcodes a single initial mint amount of one ether for every token market, which is sensible for WETH but represents an absurdly large quantity of USDC. Because the deployer would not hold that much USDC, the approval and mint calls during initial deployment would fail.

Moonwell

Medium
Business logic

Borrowers can avoid liquidations, if ERC777 token is configured as an emissionToken

If an ERC777 token is configured as an emission token, a malicious borrower can revert the reward transfer during liquidation, causing the entire liquidation transaction to fail. This allows the undercollateralised borrower to avoid liquidation, potentially accruing bad debt for the protocol.

Moonwell

Medium
Audit finding

Missing check for the max/min price in the chainlinkOracle.sol contract

The Chainlink oracle adapter in Moonwell did not check the aggregator's minimum and maximum answer bounds, so if a feed's price crashed towards the floor (as with LUNA) the oracle would keep returning the floor price rather than reverting. An attacker could then borrow or liquidate against a stale, frozen price.

Moonwell

Medium
Business logic

excuteProposal can fail due to Wormhole guardian change

A queued governance proposal can fail to execute if Wormhole's guardian set changes between queuing and execution, because the proposal is re-verified against the new guardian set. This causes a delay and requires re-sending the message from the source chain.

Moonwell

Medium
Access control

Only guardian can change guardian

The TemporalGovernor contract uses OpenZeppelin's Ownable, where the owner is the guardian, but does not override transferOwnership. This means only the guardian can transfer the guardian role, so governance cannot replace a guardian who refuses to step down, and the only alternative is to revoke the guardian, which permanently disables pausing.

Moonwell

Medium
Access control

fastTrackProposalExecution doesn’t check intendedRecipient

The fast-track execution path in the TemporalGovernor contract did not verify that a cross-chain message was addressed to that contract, unlike the normal queueing path. Because Wormhole messages are multicast, a guardian could execute a message intended for a different contract on another chain.

Moonwell

Medium