drift_optimizer
, lib
, and paystream-v1
.AccountInfo
pattern detectionowner
check on spot_market
accountget_apys.rs
, line 26paystream-v1
)AccountInfo<'info>
under CHECK:
macrosdeposit.rs
: No signer validation on protocol_vault_authority
lend.rs
: Improper validation of protocol and vault accountsborrow.rs
: Data leakage and injection risks due to unchecked accountswithdraw.rs
: Deserialization of collateral_market
without secure constraintsliquidate_by_ltv.rs
: Direct liquidatee access without auth constraints.is_signer
and .owner == expected_program_id
checks across all cross-program and CHECK:
inputsAccountInfo
fields with validated Account
or InterfaceAccount
where feasible#[account(...)]
constraints, enforce explicit runtime assertionsdangerously_mutate_*
functions with hardcoded access lists or role-based checks