coral-xyz / sealevel-attacks

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

Add comments to insecure, recommended, and secure examples #41

Open techvoyagerX opened 2 months ago

techvoyagerX commented 2 months ago

Added necessary comments to the insecure, recommended, and secure examples in the 3-type-cosplay program. These comments help clarify the purpose of certain code segments, such as ownership checks, authority validations, and the usage of account discriminants to prevent type confusion attacks.