#36117 [SC-High] Permanent freezing of tokens when user sends extra tokens as update fee
Description
Bug Description
// check if the payment is sufficient
require(
msg_amount() >= price_data_update
.update_fee && msg_asset_id() == AssetId::base(),
Error::InvalidPayment,
); //@audit-issue there is no transfer of remaining tokens back to caller when msg_amount() > update_fee
let oracle = abi(PythCore, contract_id.bits());
oracle
.update_price_feeds_if_necessary {
asset_id: AssetId::base().bits(),
coins: price_data_update.update_fee,
}(
price_data_update
.price_feed_ids,
price_data_update
.publish_times,
price_data_update
.update_data,
);Impact
Recommendation
References
Proof Of Concept
Proof of Concept
Proof of Concept
Previous#36137 [SC-Medium] `absorb_internal` might be DOSedNext#36108 [SC-Insight] `recipient` with a NULL address will lead to permanent loss of minted coins
Last updated
Was this helpful?