Q
quub
๐Ÿ“„ PRODUCTION-READY

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.

100+
Templates
Audited
Security Reviewed
10K+
Deployments
MIT
Open Source

Template Categories

Browse templates by use case

๐Ÿช™
15 Templates

Tokens & NFTs

ERC-20, ERC-721, ERC-1155, governance tokens, and custom token standards.

โ€ข ERC-20 Token
โ€ข NFT Collection
โ€ข Governance Token
โ€ข Multi-Token
๐Ÿ’Ž
25 Templates

DeFi Protocols

AMM, lending, staking, yield farming, and liquidity mining contracts.

โ€ข DEX / AMM
โ€ข Lending Pool
โ€ข Staking Vault
โ€ข Yield Aggregator
๐Ÿ›๏ธ
12 Templates

DAO Governance

Voting systems, treasuries, timelock controllers, and multisig wallets.

โ€ข Voting Contract
โ€ข Treasury
โ€ข Timelock
โ€ข Multisig
๐Ÿ›’
10 Templates

Marketplaces

NFT marketplaces, auction systems, and peer-to-peer trading platforms.

โ€ข NFT Marketplace
โ€ข Auction House
โ€ข P2P Exchange
โ€ข Escrow
๐ŸŒ‰
8 Templates

Cross-Chain

Bridge contracts, cross-chain messaging, and interoperability protocols.

โ€ข Token Bridge
โ€ข Message Relay
โ€ข Wrapped Assets
โ€ข Cross-Chain Swap
๐Ÿ”ง
20 Templates

Utilities

Access control, proxies, oracles, and common helper contracts.

โ€ข Access Control
โ€ข Upgradeable Proxy
โ€ข Oracle Integration
โ€ข Reentrancy Guard

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.

SolidityAuditedGas Optimized5K+ Downloads
๐Ÿ’Ž

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.

SolidityAuditedAdvanced3K+ Downloads
๐ŸŽจ

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.

SolidityAuditedPopular7K+ Downloads
๐Ÿ”

Staking Vault

Flexible staking with rewards distribution

Feature-rich staking contract with flexible lock periods, reward multipliers, emergency withdraw, and automatic reward distribution.

SolidityAuditedGas Optimized4K+ Downloads

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

1

Browse

Find the template that matches your use case

2

Customize

Clone repo and modify to fit your needs

3

Test

Run included test suite locally

4

Deploy

Deploy to mainnet with Quub CLI

Quick Example

# Clone template repository
git clone https://github.com/quub/erc20-template.git
cd erc20-template
# Install dependencies
npm install
# Run tests
npm test
# Deploy to testnet
npx hardhat deploy --network sepolia

Start Building Today

Browse 100+ production-ready smart contract templates. Save weeks of development time and launch your DeFi project faster.

View Documentation