coral-xyz / sealevel-attacks

☠️ Common Security Exploits and Protections on Solana
507 stars 95 forks source link

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

Open techvoyagerX opened 1 month ago

techvoyagerX commented 1 month 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.