#47370 [SC-Critical] `account_transfer_partial` should not be enabled when `transfer_registry_address` is not configured.
Description
Brief/Intro
Vulnerability Details
fn account_transfer_partial(
ref self: ContractState,
account: ContractAddress,
receiver: ContractAddress,
account_share: felt252,
amount_collateral: felt252,
) -> felt252 {
// Validate account share is between 0 and 1
assert!(
account_share.try_into().unwrap() > 0_i128
&& account_share.try_into().unwrap() <= ONE,
"AccountTransfer: account_share must be within [1,100000000]",
);
// detect transfer restriction
self
.token
._detect_account_transfer_restriction(account, receiver, account_share.into());Impact Details
References
Proof of Concept
Proof of Concept
Previous#47318 [SC-Insight] If the counterparty happens to be their own referrer, the protocol does not take the referral fee into account during the risk check.Next#47351 [SC-Low] Funds get stuck in the bridge if attempted to be deposited into a restricted address
Was this helpful?