Skip to content
Business logic Write-up Intermediate

Pods Finance Logic Error Bug Fix Review

A logic error in the reward calculation of Pods Finance's smart contracts allowed an attacker who had previously minted at least one option to repeatedly call unmintWithRewards with a single share and claim rewards owed to other users, draining the contract's reward balance. The contract was not deployed on mainnet, so no funds were at risk.

immunefi.com

Published on immunefi.com

Whitehat Csanuragjain submitted a vulnerability to Immunefi regarding Pods Finance on June 25. The vulnerability was given a severity rating of “high”, as it is a logic error that allows for theft of yield or abuse of the rewards system on the protocol.

The author, on immunefi.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The reward calculation used only the user's shares, not the amount of options being unminted, so partial unmints paid out as if the user had unminted all their shares.

Impact

An attacker could steal yield by claiming rewards owed to other users and drain the entire reward balance of the contract, but user funds were not at risk and the contract was not deployed on mainnet.

What the attacker needed

Attacker must have minted at least one option previously; contract must be deployed (it was not on mainnet)

The fix

The reward calculation was fixed to be based on the amount of options unminted rather than only the user's shares.

How it was found

  1. Mint at least one option in the past to have shares.
  2. Repeatedly call unmintWithRewards with a single share.
  3. Receive rewards calculated on the full share balance each time, draining the reward pool.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a bug in a smart contract that handles rewards for users who create options. The reward calculation incorrectly paid out based on the user's total shares rather than the number of options they were actually unminting, so someone could repeatedly unmint a tiny amount and collect rewards that belonged to others. The contract was not live, so no money was lost.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.