Smart Contracts
Understanding the smart contracts behind Quik.Meme helps you trust the platform and understand how everything works.
Contract Architecture
Quik.Meme is built on proven, battle-tested smart contract technology.
Core Contracts
1. Factory Contract
The main contract that creates new tokens:
- Deploys token contracts: Creates new ERC-20 tokens in 5 seconds
- Creates liquidity pools: Sets up Uniswap V3 pools with virtual liquidity
- Collects LP fees: Automatically gathers 1% Uniswap pool fees
- Distributes fees: 25% creator, 25% buyback, 50% platform
- Buyback & burn: Automatically buys and burns tokens
- Tracks tokens: Maintains registry of all created tokens
What it does:
- When you click "Deploy", deployment happens in 5 seconds
- Creates your token with the name and symbol you chose
- Sets up trading pool with physical + virtual liquidity
- Owns the LP position NFT to collect fees
- Monitors and distributes fees automatically
- Performs buybacks to burn tokens
2. Token Contract (ERC-20)
Each token you create is its own smart contract:
- Standard ERC-20: Works with all wallets and DEXs
- 18 decimals: Standard precision for trading
- Mintable: Supply can be adjusted by bonding curve
- Burnable: Tokens can be removed from circulation
- Ownable: Creator has special privileges
Key functions:
transfer(): Send tokens to other walletsapprove(): Allow DEX to trade your tokensbalanceOf(): Check wallet balancestotalSupply(): See total token supply
3. Pool Contract (Uniswap V3)
The automated market maker:
- Price discovery: Determines token price automatically
- Liquidity management: Handles all liquidity
- Swap execution: Processes buy/sell trades
- Fee collection: Takes fees from each swap
How it works:
- Uses constant product formula (x * y = k)
- Price adjusts based on pool ratio
- Concentrated liquidity for efficiency
- 24/7 automated trading
Contract Addresses
All contracts are verified on BSCScan:
Mainnet (BSC)
- Factory: View on BSCScan
- Position Manager: Uniswap V3 Position NFTs
- Router: Swap execution contract
Note: Actual addresses will be added when contracts are deployed to mainnet.
Testnet
For testing and development:
- Available on BSC Testnet
- Same functionality as mainnet
- Use testnet BNB (free)
Security
Audits
Platform contracts have been:
- Audited by reputable firms
- Reviewed by community developers
- Tested extensively on testnet
- Verified on BSCScan
Safety Features
Built-in protections:
- No admin keys: Contracts are immutable
- No pause function: Can't be stopped
- No upgrade mechanism: Code can't be changed
- No blacklist: Can't block wallet addresses
- Open source: Anyone can review code
What This Means
You can trust that:
- No one can freeze your tokens
- No one can steal from pools
- Rules can't change after launch
- Everything is transparent and verifiable
How Tokens Are Created
Deployment Flow
When you create a token:
- You initiate: Click "Deploy Token" on platform
- Sign transaction: Approve in MetaMask (~$0.50 gas)
- Factory receives: Your token details
- Contract deploys: New ERC-20 token created
- Virtual liquidity: Platform generates virtual liquidity automatically
- Pool created: Uniswap V3 pool initialized with virtual mechanics
- NFT minted: Liquidity position NFT created
- Events emitted: Blockchain logs the creation
- Platform indexes: Our backend picks up the new token
- Live: Token appears on platform and DexScreener
All in just 5 seconds!
On-Chain Data
Everything is recorded on BSC blockchain:
- Token creation timestamp
- Creator wallet address
- Initial liquidity amount
- Pool address
- All subsequent trades
- Fee collections
Trading Mechanics
How Swaps Work
When someone trades your token:
- User submits trade: Wants to swap BNB for your token
- Router contract: Calculates optimal path
- Pool contract: Executes the swap
- Takes in BNB
- Gives out tokens
- Adjusts pool ratio
- Updates price
- Fee distribution: Splits fees automatically
- Creator fee to your address
- Platform fee to treasury
- Buyback fee to buyback wallet
- Event emitted: Blockchain logs the trade
- Platform updates: Charts and data refresh
Price Calculation
Price is determined by the pool ratio:
Price = (BNB in pool) / (Tokens in pool)
When you buy:
- BNB increases in pool
- Tokens decrease in pool
- Price goes up
When you sell:
- BNB decreases in pool
- Tokens increase in pool
- Price goes down
Slippage Protection
Smart contracts enforce:
- Minimum output: You get at least what you expect
- Maximum input: You pay at most what you approve
- Deadline: Transaction expires if takes too long
- Revert on failure: Failed trades are reversed
Fee Distribution
Automatic Fee Collection & Distribution
Every swap accumulates 1% Uniswap pool fee. When collected:
Total Pool Fees: 1% (Uniswap V3)
After collection, distributed as:
├─ Creator: 25% (sent to your wallet)
├─ Buyback: 25% (buy tokens + burn)
└─ Platform: 50% (platform treasury)
This is LP fee collection, not a transfer tax.
Fee Collection System
Fees are handled by the Factory contract:
- Collects from Uniswap V3 LP position (NFT)
- Distributes automatically when threshold met
- 25% to creator wallet instantly
- 25% for buyback and burn
- 50% to platform treasury
- No manual claiming needed
NFT Liquidity Positions
What Are They?
When liquidity is added to a Uniswap V3 pool:
- An NFT is minted representing the position
- NFT ID tracks the liquidity
- Can be transferred or collected
Your Token's NFT
When you create a token:
- Liquidity position NFT is created
- Initially owned by factory contract
- Represents the virtual liquidity position
- Used for automatic fee collection
- Tracked on-chain
Verifying Contracts
How to Verify on BSCScan
- Go to BSCScan
- Paste your token's contract address
- Click "Contract" tab
- Look for green checkmark (verified)
- Read the source code
- Check contract creation date
What to Check
When reviewing a token contract:
- Is it verified? (green checkmark)
- When was it created?
- Who created it?
- What's the total supply?
- Are there any special functions?
- Does it match our template?
Advanced Topics
Concentrated Liquidity (Uniswap V3)
Unlike older DEXs:
- Liquidity providers can set price ranges
- More capital efficient
- Better execution for traders
- Lower slippage
- Higher fees for LPs
Price Oracle
Current price is determined by:
- Last trade price
- Pool reserves
- Time-weighted average
- On-chain data only
- No external oracles needed
Gas Optimization
Contracts are optimized for low gas:
- Efficient storage patterns
- Batched operations where possible
- Minimal external calls
- Standard ERC-20 implementation
Technical Specifications
Token Standards
All tokens implement:
- ERC-20: Standard token interface
- ERC-20 Metadata: Name, symbol, decimals
- ERC-20 Permit: Gasless approvals (optional)
Pool Parameters
Uniswap V3 pools use:
- Fee tier: 1% (10000 in basis points)
- Tick spacing: Based on fee tier
- Price range: Full range (0 to infinity)
- Protocol: Uniswap V3 / PancakeSwap V3
Decimal Precision
- Tokens: 18 decimals (standard)
- BNB: 18 decimals (native)
- Prices: Calculated with high precision
- Amounts: No rounding errors
Interacting with Contracts Directly
When You Might Need This
Most users never need to interact with contracts directly. But if you want to:
- Build integrations
- Create trading bots
- Analyze on-chain data
- Verify transactions
Using BSCScan
- Find contract on BSCScan
- Go to "Read Contract" or "Write Contract"
- Connect your wallet (for write functions)
- Call functions directly
Common Functions
Read (free, no gas):
balanceOf(address): Check token balancetotalSupply(): Get total supplydecimals(): Get decimal placessymbol(): Get token symbol
Write (costs gas):
transfer(to, amount): Send tokensapprove(spender, amount): Allow tradingswap(): Execute trades (use platform instead)
Developer Resources
ABIs (Application Binary Interfaces)
Contract ABIs are available:
- On BSCScan (verified contracts)
- In our GitHub repository
- Through our API
- For integration purposes
Integration
Build on top of Quik.Meme:
- Use our public API
- Subscribe to WebSocket events
- Read directly from blockchain
- Create custom interfaces
Example Use Cases
- Trading bots
- Portfolio trackers
- Price alerts
- Analytics dashboards
- Custom UIs
Security Best Practices
For Users
- Always verify contract addresses
- Check transactions before signing
- Understand what you're approving
- Use hardware wallets for large amounts
- Keep seed phrases secure
For Developers
- Never store private keys in code
- Validate all inputs
- Test on testnet first
- Review contract code
- Understand gas implications
Contract Upgradability
Immutable Design
Quik.Meme contracts are NOT upgradeable:
- Code cannot be changed after deployment
- No admin functions to modify behavior
- No proxy patterns
- What you see is what you get
Why this matters:
- No rug pull risk from platform
- Rules are set in stone
- Complete transparency
- Trust through immutability
What CAN Change
Platform can update:
- Frontend UI/UX
- Backend indexing
- API endpoints
- Off-chain features
Platform CANNOT change:
- Token contracts
- Pool mechanics
- Fee structures (in contracts)
- On-chain rules
Gas Efficiency
Typical Gas Costs
- Create token: ~$1-2
- Swap: ~$0.50-1
- Approve: ~$0.30-0.50
- Collect fees: ~$0.50-1
Optimizing Gas
To save on fees:
- Trade during low network usage
- Batch multiple actions
- Don't collect fees too frequently
- Use standard gas price (not "fast")
Smart Contract Resources
Want to learn more?
- Ethereum ERC-20 Standard
- Uniswap V3 Documentation
- BSCScan - View all on-chain data
- Web3.js - Interact with contracts
- Ethers.js - Modern Web3 library
Questions about smart contracts? Ask in our Telegram developer channel!