coral-xyz / sealevel-attacks

☠️ Common Security Exploits and Protections on Solana
518 stars 99 forks source link

Arithmetic overflow/underflow protection examples #23

Open anoushk1234 opened 2 years ago

anoushk1234 commented 2 years ago

We should have some examples showing how to implement mathematical operations using checked_add, checked_sub, saturating_pow etc

armaniferrante commented 2 years ago

Would be great!