Smart Contract Templates
Launch Faster with Audited Code
Production-ready, audited smart contract templates for common DeFi patterns. Copy, customize, and deploy in minutes instead of weeks.
Template Categories
Browse templates by use case
Tokens & NFTs
ERC-20, ERC-721, ERC-1155, governance tokens, and custom token standards.
DeFi Protocols
AMM, lending, staking, yield farming, and liquidity mining contracts.
DAO Governance
Voting systems, treasuries, timelock controllers, and multisig wallets.
Marketplaces
NFT marketplaces, auction systems, and peer-to-peer trading platforms.
Cross-Chain
Bridge contracts, cross-chain messaging, and interoperability protocols.
Utilities
Access control, proxies, oracles, and common helper contracts.
Featured Templates
Most popular and recently added templates
ERC-20 Token
Standard fungible token with advanced features
Complete ERC-20 implementation with minting, burning, pausing, and role-based access control. Includes permit functionality for gasless approvals.
Automated Market Maker (AMM)
Uniswap V2 style DEX with liquidity pools
Full AMM implementation with factory, router, and pair contracts. Supports ERC-20 token swaps, liquidity provision, and LP token rewards.
NFT Collection (ERC-721)
Complete NFT collection with minting and royalties
ERC-721 NFT contract with whitelist minting, reveal mechanism, royalty standards (EIP-2981), and enumerable extensions for easy indexing.
Staking Vault
Flexible staking with rewards distribution
Feature-rich staking contract with flexible lock periods, reward multipliers, emergency withdraw, and automatic reward distribution.
Why Use Our Templates
Production-ready code that saves you time and money
Security Audited
All templates are professionally audited by leading security firms. Reviewed for common vulnerabilities and best practices.
Gas Optimized
Optimized for minimal gas consumption. Save your users money on every transaction with efficient code patterns.
Well Documented
Comprehensive documentation, inline comments, and usage examples. Understand how everything works quickly.
Fully Tested
100% test coverage with unit and integration tests. Deploy with confidence knowing the code is battle-tested.
Upgradeable
Built with upgradeable proxy patterns. Fix bugs and add features without redeploying contracts.
Customizable
Modular design makes it easy to customize. Add your own features or modify existing functionality.
How to Get Started
Deploy your first smart contract in minutes
Browse
Find the template that matches your use case
Customize
Clone repo and modify to fit your needs
Test
Run included test suite locally
Deploy
Deploy to mainnet with Quub CLI
Quick Example
Start Building Today
Browse 100+ production-ready smart contract templates. Save weeks of development time and launch your DeFi project faster.