On Solana, all data is stored in "accounts," similar to a key-value store where each entry is an account.
- Account Storage: Up to 10MB of data, including executable code or program state.
- Rent: Accounts require a SOL deposit proportional to data size, refundable upon account closure.
- Account Ownership: Only the owning program can modify an account's data or reduce its lamport balance. Anyone can increase the balance.
- Address: A unique 32-byte Ed25519 PublicKey.
The address of a normal account in Solana is a Base58-encoded string of a 256-bit ed25519 public key. Not all bit patterns are valid public keys for the ed25519 curve, so it is possible to ensure user-supplied account addresses are at least correct ed25519 public keys.
- Data: Byte array storing account state or executable code.
- Executable: Flag indicating if the account is a program.
- Lamports: Account balance in lamports (1 SOL = 1 billion lamports).
- Owner: PublicKey of the owning program.
- Program Accounts: Stateless accounts storing executable code.
-
Data Accounts: Store and manage program state, created by programs.
-
Native Programs: Built-in programs with core functionalities, e.g., System Program and BPF Loader.
-
Sysvar Accounts: Store network cluster state.
-
- Creates new accounts.
- Allocates data space.
- Assigns program ownership.
- Manages wallet accounts.
-
BPF Loader Program:
- Deploys, upgrades, and executes custom programs.
- Program Account: Stores program's executable data and update authority.
- Program Executable Data Account: Contains executable byte code.
- Buffer Account: Temporary storage during deployment/upgrades.
- System Program: Creates the account and transfers ownership.
- Custom Program: Initializes account data.
The scope of Uniswap Labs’ first working AMM model (K = x*y) cannot be understated in the history of DeFi, as the working application of liquidity pools instantaneously made standalone orderbook DEXes, on both Ethereum (Etherdelta, IDEX) and other chains (Bitshares, Waves, Cryptobridge) obsolete, almost overnight. Uniswap was a truly revolutionary addition to the future of DeFi, and demonstrated the legitimacy and potential of the DEX/AMM financial primitive as the bedrock for transparent, trustless commerce. Solana’s current DEX/AMM infrastructure and prospective DeFi product suite stands on the shoulders of invaluable contributions by the Ethereum Foundation, Uniswap Labs, & the greater DeFi community.
Solana’s high-throughput, low-latency, processing capabilities provide the means for a vast suite of sophisticated AMM applications for decentralized operations, such as high-frequency trading, central limit order books(CLOB), derivatives, cloud computing, and cloud storage. These financial instruments and Web3 interfaces are rapidly being built on Solana, with seamless scaling to support over 1 billion user accounts on a single state machine.
Raydium is an on-chain order book and automated market maker (AMM) that enables lightning-fast trades, shared liquidity and new features for earning yield. Initially offered as a standalone DEX/AMM product, Raydium offers a suite of services to its users such as launchpads, accelerators, and yield farming.
Note: Currently, there are two supported operations for trading on Raydium. Users can transact through the Orderbook (Trading tab) or through the AMM (Swap tab).
Documentation: https://raydium.gitbook.io/raydium/ How to use Raydium: https://raydium.gitbook.io/raydium/
This portfolio showcases my work and progress within the Turbin3 Q3 Sol Cohort program. Below are the detailed steps, scripts, and outcomes of my projects on the Solana blockchain.
Description | Transaction Link |
---|---|
Airdrop Transaction | View Transaction |
Transfer Transaction | View Transaction |
Enroll Transaction | View Transaction |
-
Environment Setup:
- Ensure Node.js and Yarn are installed.
- Initialize project directory:
mkdir airdrop && cd airdrop yarn init -y
-
Package Installation:
- Install required packages:
yarn add @types/node typescript @solana/web3.js bs58 yarn add -D ts-node
- Install required packages:
-
TypeScript Configuration:
- Generate TypeScript configuration:
yarn tsc --init --rootDir ./ --outDir ./dist --esModuleInterop --lib ES2019 --module commonjs --resolveJsonModule true --noImplicitAny true
- Generate TypeScript configuration:
- Generate a new Solana wallet keypair:
yarn keygen
- Request 2 SOL airdrop from Solana Devnet:
yarn airdrop
- Transfer 0.1 SOL to another wallet:
yarn transfer
- Submit your GitHub account to the Solana program:
yarn enroll
File Name | Description |
---|---|
keygen.ts | Script to generate a new Solana wallet keypair. |
airdrop.ts | Script to request SOL tokens from Solana Devnet to the generated wallet. |
transfer.ts | Script to transfer SOL from the generated wallet to another specified wallet. |
enroll.ts | Script to interact with the Solana program and submit your GitHub account. |
Turbin3 Qohort Homework-1 & Homework-2
Participated in a collaborative task development session, creating and managing token accounts.
-
Create Mint Account:
ts-node ./cluster1/spl_init.ts Success! Your mint address is: 2sZ4ZHHTHeB3wSbNvnZeD27FLUrmMx8hzQa18EfyKjKX
-
Create Token Account:
ts-node ./cluster1/spl_mint.ts Your ata is: BAJaTUTE3eyyeQs7g4eBbhZBPtyG2aYYRX3yycWZnj7Z Success! Your mint transaction is: 3JSEffd5kXeKTXduzeVVRixNmdfeqEkqruX5LTpv1FqbBkJzyw84gCC96TsBvAU3EPBvCjFkd7tNpuMfkc9fcfjL
-
Mint Tokens:
Your ata is: BAJaTUTE3eyyeQs7g4eBbhZBPtyG2aYYRX3yycWZnj7Z Success! Your mint transaction is: 3TUxcfvZFseFyo4JndcprzLtJkPAREvEzoNqnCzX6j3uZ7MLyBgdUDiKRvP7sQsPyxEKatgywtaXJCPrJWvQS2y4
Watched a recorded presentation by Nick Frostbutter about Blinks.
- Complete
spl_transfer
:yarn spl_transfer yarn
run v1.22.21 $ ts-node ./cluster1/spl_transfer.ts Transaction signature: NzCn6uC7oNNWupmm4gLNtujncTEvQG9igodmfB2SK6ah2oz1oWjd7NooyoCPzmJ8ZnEsfeVwtL7siEjsj1CJpaT ✨ Done in 2.93s.
- **Complete `sql_metadata`**:
```bash
➜ ts git:(master) ✗ yarn nft_metadata
yarn run v1.22.21
$ ts-node ./cluster1/nft_metadata.ts
Your image URI: https://arweave.net/IgUpys1136O9Uf-A08Rc20_eP6_FWIAqx4TA3D2_DYI
-
Random Rugs: Generate Random Rugs
-
Initialized NFT:
yarn nft_mint yarn run v1.22.21 $ ts-node ./cluster1/nft_mint.ts Succesfully Minted! Check out your TX here: https://explorer.solana.com/tx/3Cqz37kLDgzAtihx3gspHMiqvgqXPyT19t5wmWCWydUn8PCJt5N7KemWWB8KaeUcfTfFJotw735oqgJ48XihTDAS?cluster=devnet Mint Address: 4iDK7p4n3G5C66zhSCcSoVB9nTZfSUy3j88jdZpA8222 ✨ Done in 3.28s.
-
RUG NFT Address: RUG NFT Address