The repayDebt function in the stBTC contract is documented to return the amount of assets paid off, but it actually returns the number of shares. This gives callers an incorrect value, which could mislead them about the debt repaid.
The mintDebt function in the stBTC contract rounds down when converting shares to assets, so minting 1 wei of shares can add zero debt. An attacker could repeatedly mint tiny amounts of shares without increasing assets, slightly diluting the value of existing shares.
The MezoAllocator's withdrawal function subtracts the requested amount from its recorded portal deposit balance without accounting for tBTC held directly in the allocator, so a withdrawal larger than the portal deposit but smaller than total allocator assets causes an arithmetic underflow and reverts. This can block users from withdrawing their funds until the next allocation by maintainers.
When the owner of StBTC changes the dispatcher, the allowance for the old dispatcher is set to zero but any assets still held by the old dispatcher are not withdrawn. This could lead to a loss of deposited funds if the old dispatcher does not return them.
The mintDebt() and repayDebt() functions return the shares value the caller supplied rather than the corresponding assets value, contrary to the ERC4626 convention that minting functions return assets. This could cause integration issues with other smart contracts and confuse users when the shares-to-assets ratio is not 1:1.
The stBTC contract relies on the MezoAllocator's depositBalance to top up tBTC for withdrawals, but this value can be lower than the actual tBTC held by the allocator, causing a shortfall. As a result, stBTC holders may be unable to redeem their tokens, rendering the protocol insolvent.
The mintDebt function returns the shares amount instead of the assets amount, contradicting its declared return type and documentation. This wrong return value breaks the ERC-4626 invariant that mint functions should return assets.
The stBTC contract's totalAssets calculation includes tBTC donated directly to the dispatcher contract, which is not used in any fund flows. An attacker can donate tBTC to inflate the share price, then redeem their shares to drain the Mezo portal deposit, leaving other users unable to redeem and the emergency function reverting.
A debtor who borrowed stBTC shares could not fully repay their debt after an attacker donated a tiny amount of tBTC to the contract, because the donation raised the share-to-asset conversion rate. The repayment function compared the newly inflated asset value against the original debt and reverted, leaving the debt permanently unrepayable in full.
The stBTC contract calculates share value using total assets that include tBTC sent directly to the MezoAllocator but not yet allocated to the portal. An attacker can donate a tiny amount of tBTC to the allocator, inflating total assets so that the last user's redemption reverts due to an arithmetic underflow.
The releaseDeposit function calls mezoPortal.withdraw even when the deposit has already been fully withdrawn, causing a revert. This prevents migration of any tBTC left in MezoAllocator, such as donations or rewards, which then become permanently stuck.
The repayDebt function calculates the assets to repay using a conversion rate that can be manipulated by transferring a tiny amount of tBTC directly to the contract. An attacker can front-run a repayment with a 2 wei transfer, causing the calculated assets to exceed the recorded debt and making the repayment revert.
The stBTC redeem function relies on the Mezo allocator's depositBalance value, which can be lower than the actual tBTC held, causing a shortfall when many holders redeem. Holders may be unable to redeem their tBTC even though the system overall holds sufficient funds.
AC
Acre
Low
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.