Skip to content
Business logic Write-up Advanced

Silo Finance Logic Error

A logic error in Silo Finance's lending contract allowed an attacker to manipulate the interest rate of an asset with zero total deposits by donating tokens and borrowing, inflating the interest rate to an extremely high value. This could have let the attacker borrow most of the funds in the market, with an estimated $3 million at risk.

immunefi.com

Published on immunefi.com

On April 28th, a veteran whitehat known as @kankodu responsibly disclosed a critical logic error vulnerability to Silo Finance via Immunefi. The vulnerability showcased a potential exploit that could have allowed a malicious hacker to steal assets from the Silo pool contract.

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

Likely the interest rate calculation did not cap the utilization rate, allowing it to exceed 100% when total borrows exceeded total deposits, which inflated the interest rate disproportionately.

Impact

The attacker could have borrowed most of the funds in the market, with an estimated $3 million at risk across various Silo pools on Ethereum.

What the attacker needed

A market with zero total deposits for an asset; attacker has some WETH and LINK; attacker can perform multiple transactions

The fix

The project implemented a cap in the utilization rate calculation and limited the maximum compounded interest rate to 10k% APR, and the fix was deployed to mainnet.

How it was found

  1. Determine a market that had 0 total deposits for one of the assets in the market.
  2. Become the majority shareholder for that particular asset by depositing WETH to that market.
  3. Donate additional WETH to the market.
  4. Use another user/address to deposit another asset in the market, to borrow the donated WETH.
  5. In the next block, if accrueInterest() is called, the utilization rate of the attacker's initial deposited amount will be over 100%.
  6. Because of this inflated interest rate, the attacker's initial deposit is valued more than it should be, and it allows the attacker to borrow most of the funds in the market.

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.

Silo Finance is a lending protocol where users deposit tokens as collateral and borrow other tokens. The bug let an attacker artificially inflate the interest rate for a token that had no deposits, making their small deposit appear hugely valuable and allowing them to borrow far more than they should. This could have drained funds from the market.

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.