Skip to content
Business logic Write-up Advanced

Retro+Thena+unknown protocol

A flaw in the bribe withdrawal logic of a voting escrow system allowed an attacker to retain voting power in multiple gauges without actually locking tokens, enabling them to steal all rewards for the upcoming week. The issue affected Retro, Thena, and an unnamed protocol.

github.com

Published on github.com

History

The author, on github.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

Likely the bribe contract's withdraw function fails to reduce a user's balance when the withdrawal amount exceeds their current balance, allowing balances to persist incorrectly across weeks.

Impact

An attacker could steal all rewards allocated for the upcoming week, and under some conditions this could remain unnoticed for a prolonged time.

What the attacker needed

Ability to create multiple locks; multiple gauges exist; wait for a week to pass

How it was found

  1. Mint a lock for a tiny amount for each gauge.
  2. Vote with each tiny lock on a different gauge.
  3. Create a lock with a large amount of tokens.
  4. Wait for a week to pass so balances reset to zero.
  5. Vote with the large lock on the first gauge.
  6. Reset the tiny lock on the same gauge, then reset the large lock, repeating for all gauges.

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.

In this system, users lock tokens to get voting power and direct it to pools to earn rewards. A bug in how votes are withdrawn meant that under certain conditions, a user's voting power was not reduced when it should have been, letting them claim rewards without actually locking tokens.

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.