IOP _ ThunderNFT 34519 - [Smart Contract - High] users cant withdraw their tokens when specific asse
Description
Brief/Intro
Vulnerability Details
/// Deposits the supported asset into this contract
/// and assign the deposited amount to the depositer as bid balance
#[storage(read, write), payable]
fn deposit() {
let asset_manager_addr = storage.asset_manager.read().unwrap().bits();
let asset_manager = abi(AssetManager, asset_manager_addr);
require(asset_manager.is_asset_supported(msg_asset_id()), PoolErrors::AssetNotSupported); //@audit only supported
let address = msg_sender().unwrap();
let amount = msg_amount();
let asset = msg_asset_id();
let current_balance = _balance_of(address, asset);
let new_balance = current_balance + amount;
storage.balance_of.insert((address, asset), new_balance);
log(Deposit {
address,
asset,
amount
});
}
Impact Details
References
Proof of concept
Proof of Concept
PreviousIOP _ ThunderNFT 34496 - [Smart Contract - High] Users cant withdraw their funds for removed assetsNextIOP _ ThunderNFT 34522 - [Smart Contract - Low] Self-transfer would inflate the balance
Last updated
Was this helpful?