#46747 [SC-Insight] Self-Referral Vulnerability in Account Referral System
Description
Summary
Vulnerability Details
fn set_account_referral(
ref self: ComponentState<TContractState>,
account: ContractAddress,
referrer: ContractAddress,
commission: felt252,
discount: felt252,
) {
self.assert_only_role(roles::CONFIGURATOR_ROLE);
self
.Paraclear_account_referral
.write(
account,
AccountReferral {
referrer: referrer, fee_commission: commission, fee_discount: discount,
},
);
self
.emit(
AccountReferralUpdate {
account: account,
referrer: referrer,
fee_commission: commission,
fee_discount: discount,
},
);
}Impact
Recommended Fix
Proof of Concept
Proof of Concept
Previous#46676 [SC-Insight] Unrestricted Minimum Lockup PeriodNext#46839 [SC-Low] `max_withdraw` and `max_withdraw` do not fully consider global restrictions.
Was this helpful?