Skip to content

Quantillon-Labs/smart-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

285 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Smart Contracts - Quantillon Protocol

Quantillon Protocol Banner

License: MIT Solidity Foundry

Smart Contracts Repository for Quantillon Protocol - Euro-pegged stablecoin ecosystem with dual-pool architecture

πŸ“ Repository Structure

This repository contains the complete smart contract implementation for the Quantillon Protocol. All development files are organized in the quantillon-protocol directory.

smart-contracts/
β”œβ”€β”€ quantillon-protocol/          # Main project directory
β”‚   β”œβ”€β”€ src/                     # Smart contract source code
β”‚   β”‚   β”œβ”€β”€ core/               # Core protocol contracts
β”‚   β”‚   β”œβ”€β”€ interfaces/         # Contract interfaces
β”‚   β”‚   β”œβ”€β”€ libraries/          # Utility libraries
β”‚   β”‚   └── oracle/             # Oracle integration
β”‚   β”œβ”€β”€ test/                   # Comprehensive test suite
β”‚   β”œβ”€β”€ scripts/                # Build and deployment scripts
β”‚   β”œβ”€β”€ docs/                   # Generated documentation
β”‚   β”œβ”€β”€ lib/                    # External dependencies
β”‚   β”œβ”€β”€ foundry.toml           # Foundry configuration
β”‚   └── README.md              # Detailed project documentation
└── README.md                   # This file

πŸš€ Quick Navigation

Main Project

πŸ“ quantillon-protocol/ - Complete smart contract implementation

Key Directories

🎯 What is Quantillon Protocol?

Quantillon Protocol is a comprehensive DeFi ecosystem built around QEURO, a Euro-pegged stablecoin. The protocol features a dual-pool architecture that separates user deposits from hedging operations, enabling efficient yield generation while maintaining stability.

Core Components

  • QEUROToken: Euro-pegged stablecoin with configurable supply cap and rate limiting
  • QTIToken: Governance token with vote-escrow mechanics and voting power multipliers
  • QuantillonVault: Main vault for overcollateralized QEURO minting
  • UserPool: User deposit and staking management with yield distribution
  • HedgerPool: EUR/USD hedging operations with margin management
  • stQEUROToken: Yield-bearing wrapper token with automatic yield accrual

Key Features

  • Dual-pool architecture separating user deposits from hedging operations
  • Role-based access control for all critical operations
  • Emergency pause mechanisms for crisis situations
  • Upgradeable architecture via UUPS pattern
  • Oracle integration for EUR/USD price feeds
  • Yield generation through multiple mechanisms

πŸƒβ€β™‚οΈ Getting Started

Prerequisites

Quick Start

# Clone the repository
git clone https://github.com/quantillon/smart-contracts.git
cd smart-contracts

# Navigate to the main project
cd quantillon-protocol

# Install dependencies and build
forge install
forge build

# Run tests
forge test

πŸ“š Documentation

Generated Documentation

cd quantillon-protocol
forge doc --build
forge doc --serve

Contract Documentation

πŸ—οΈ Core Contracts

Contract Purpose Location
QEUROToken Euro-pegged stablecoin quantillon-protocol/src/core/QEUROToken.sol
QTIToken Governance token quantillon-protocol/src/core/QTIToken.sol
QuantillonVault Main vault quantillon-protocol/src/core/QuantillonVault.sol
UserPool User deposits quantillon-protocol/src/core/UserPool.sol
HedgerPool Hedging operations quantillon-protocol/src/core/HedgerPool.sol
stQEUROToken Yield-bearing wrapper quantillon-protocol/src/core/stQEUROToken.sol

πŸ§ͺ Testing

cd quantillon-protocol

# Run all tests
forge test

# Run with verbose output
forge test -vvv

# Generate coverage
forge coverage

πŸ”§ Development

cd quantillon-protocol

# Format code
forge fmt

# Build contracts
forge build

# Deploy to local network
forge script script/deploy/DeployProtocol.s.sol --rpc-url http://localhost:8545 --broadcast

Development Tools

The protocol includes comprehensive development and analysis tools:

# Code Quality & Analysis
make gas-analysis      # Comprehensive gas optimization analysis
make analyze-warnings  # Analyze and categorize build warnings
make validate-natspec  # Validate NatSpec documentation coverage
make slither          # Security vulnerability analysis

# Documentation & Testing
make docs             # Generate HTML documentation
make test             # Run comprehensive test suite
make coverage         # Generate test coverage report

# Complete Development Pipeline
make all              # Run all checks (build, test, coverage, docs, analysis)

Key Features:

  • Gas Analysis: Contract size optimization, function visibility analysis, storage layout optimization
  • Warning Analysis: Categorizes build warnings by type with actionable recommendations
  • NatSpec Validation: Ensures 100% documentation coverage for security audits
  • Security Analysis: Comprehensive vulnerability detection with Slither
  • Documentation: Auto-generated HTML documentation from NatSpec comments

πŸ”’ Security

  • Security Contact: team@quantillon.money
  • Security Features: Role-based access control, reentrancy protection, emergency pause mechanisms
  • Security Analysis: Integrated Slither analysis with make slither
  • Warning Analysis: Comprehensive build warning analysis with make analyze-warnings

For detailed security information, see the main project README.

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes in the quantillon-protocol directory
  4. Add tests and update documentation
  5. Submit a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌐 Links

πŸ“– Detailed Documentation

For comprehensive documentation, setup instructions, and development guides, please see:

πŸ“ quantillon-protocol/README.md


Built with ❀️ by the Quantillon Labs team

About

Quantillon Labs Smart Contracts

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors