Skip to content

solana-turbin3/Q3_25_Builder_AndrewFang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 Q3 2025 Turbin3 Builder Cohort

Turbine Banner

Enrollment - NFT mint (rs&ts)
  • Prerequsites code task: ts | rs

  • Take-aways

    • Never expose private keys or seed phrases to public
Week1 - SPL FT & NFT
Week2 - FT Trade
  • vault & escrow & amm:

  • Take-aways

    • Custody based on trustless onchain escrow is widely used on almost any defi application.
    • Variable naming should be straightforwrd about the data referred to.
Week3 - NFT Stake & Trade
  • nft stake & nft marketplace:

  • Take-aways

    • If program is not specified, it uses crate::ID (your program's ID). Anchor resolves the PDA using something like this internally:

      let (pda, bump) = Pubkey::find_program_address(seeds, program_id);
    • A system account can be created and passed into instructions without being initialized with any custom data or logic.

      #[account(
          seeds = [b"treasury", marketplace.key().as_ref()],
          bump,
      )]
      pub treasury: SystemAccount<'info>, // PDA owned by system program
    • If an account doesn’t require an exclusive signing authority, then it can be a random keypair or a program-derived address (PDA), such as an SPL Token mint — because no one needs to hold the private key to use it.

    • Data type hack:

      • For numbers:

        • Use the smallest type that safely fits your data (e.g., u8, u64, u128) to save account space.

        • Use checked_add, checked_mul, checked_sub, etc., to avoid panics or logic bugs.

        • Document max values explicitly if used for things like points, weights, or supply.

      • For Strings: are variable-length, costly to store, and hard to compare efficiently on-chain.

        • Convert user-facing strings (e.g. names, symbols, tags) to a fixed-size hash (e.g., Pubkey, [u8; 32], or u64 short hash).
Week4 - dice & magicblock_counter
  • dice & magicblock counter:

  • Take-aways

    • Test tips: On-chain instruction invokes and state changes can be inspected locally in .anchor logs.

      These logs are decoded (human-readable) and faster to analyze compared to scanning transactions on an on-chain explorer.

    • Capstone related: Merkle tree proof verification has high cost in both byte size (large proofs) and computation units. Optimization in both areas is important:

      • For hash function choice:
        • Poseidon: extremely efficient (designed for zk constraints) in field computation.
        • SHA‑2: good for non-zk implementation.
Capstone

📬 Connect me

✉️ [email protected]
🐦 X: @andrew_f_c

This submission represents my own work in accordance with academic integrity policies.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors