Skip to content
Smart contracts Write-up Advanced

[web3] Rounding convention bug disclosure

A rounding convention bug in the liquidation function of the Singleton contract allowed an attacker to steal user funds through a sophisticated attack involving a malicious pool extension contract, a new lending pool, and flashloans. The vulnerability was reported and fixed.

docs.vesu.xyz

Published on docs.vesu.xyz

This report outlines the discovery, reporting, and resolution of a critical vulnerability in the Vesu lending protocol. The vulnerability was identified by a whitehat hacker through Vesu’s Immunefi bug bounty program and was successfully addressed in collaboration with the whitehat hacker, ChainSecurity, Argent’s…

The author, on docs.vesu.xyz

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 a rounding error in the liquidation logic when the receive_as_shares flag is used, allowing an attacker to exploit the difference between shares and underlying assets.

Impact

The vulnerability could have been exploited to steal user funds, but it was reported and fixed before any loss occurred.

What the attacker needed

Malicious pool extension contract; attacker-created lending pool; flashloans

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 report describes a flaw in a lending protocol's smart contract. The flaw was in how numbers were rounded when liquidating a position, which could let an attacker manipulate the system to steal funds. The attack required creating a malicious extension contract and using flashloans, but the issue was fixed before any funds were lost.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.