#46856 [SC-Medium] The calculation of shares obtained through token trades will be incorrect, causing users to pay excessive yield fees.
Description
Brief/Intro
Vulnerability Details
fn deposit(ref self: ContractState, assets: u256, receiver: ContractAddress) {
...
// caller address is only used to pull funds from asset
// rest of the logic is based on the receiver address
erc20_disp.transferFrom(caller, this, assets);
let current_balance = self.asset_balances.read(receiver);
let new_balance = current_balance + assets;
self.asset_balances.write(receiver, new_balance);Impact Details
References
Proof of Concept
Proof of Concept
Previous#46843 [SC-Critical] Bypass of Restrictions When Paraclear_transfer_registry Is UnregisteredNext#46867 [SC-Insight] The `is_liquidation` field in `transfer_internal` is not properly differentiated.
Was this helpful?