tour · basics · lesson 6 of 25
deadass
deadass NAME: Type = value; is a constant, Anchor's pub const. type_shi Name = Type; is a type alias. Bps is basis points: 250 means 2.5%.
bps!(amount, rate) takes that cut, overflow checked.
That bare 250 in trade is a magic number. Magic numbers are how desks blow up.
your move: add deadass FEE_BPS: Bps = 250; at the top of the program, then use FEE_BPS instead of 250 in bps!.
loading the compiler…