Next-gen DeFi launchpad
Website | Documentation | Twitter | Discord
Oikos Protocol is a next-generation DeFi infrastructure that combines autonomous liquidity management, collateralized lending, and adaptive token supply mechanisms built on Uniswap V3. The protocol enables permissionless token launches with built-in liquidity, staking rewards, and borrowing capabilities.
- Diamond Architecture (EIP-2535) - Modular, upgradeable smart contract system
- Autonomous Liquidity Management - Protocol-owned liquidity on Uniswap V3
- Collateralized Lending - Borrow against protocol liquidity with dynamic rates
- Adaptive Supply Controller - Algorithmic supply adjustments based on market conditions
- Staking & Rebasing - Stake OKS tokens for sOKS with auto-compounding rewards
- MEV Protection - TWAP oracle integration for manipulation-resistant pricing
- Presale Infrastructure - Fair launch mechanism with soft/hard caps and referral system
┌─────────────────────────────────────────────────────────────────────┐
│ OikosFactory │
│ (Vault Deployment, Token Creation, Protocol Configuration) │
└─────────────────────────────────────────────────────────────────────┘
│
┌────────────────────────┼────────────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ TokenFactory │ │ ExtFactory │ │ DeployerFactory │
│ (OKS Token) │ │ (Vault Facets) │ │ (Deployers) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ Diamond Vault (EIP-2535) │
├─────────────────┬─────────────────┬─────────────────┬───────────────┤
│ BaseVault │ LendingVault │ StakingVault │ AuxVault │
│ (Core Logic) │ (Borrowing) │ (Rewards) │ (Helpers) │
├─────────────────┼─────────────────┼─────────────────┼───────────────┤
│ ExtVaultShift │ ExtVaultLending │ExtVaultLiquidat.│ LendingOps │
│ (Price Shifts) │ (Loan Mgmt) │ (Liquidations) │ (Operations) │
└─────────────────┴─────────────────┴─────────────────┴───────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ Uniswap V3 Pool │
│ (Protocol-Owned Liquidity Positions) │
└─────────────────────────────────────────────────────────────────────┘
| Contract | Address | Description |
|---|---|---|
| OKS Token | 0x614da16Af43A8Ad0b9F419Ab78d14D163DEa6488 |
Protocol governance token |
| OikosFactory | 0x9F5973EC7E5f0781E0fCE71Dd949c997c38508Fc |
Main factory contract |
| Resolver | 0xb9439a0f7d1Ef78d13905574B7ecd87B0Cd52aBE |
Address registry |
Each vault is a Diamond proxy (EIP-2535) managing:
- Floor Liquidity - Concentrated liquidity at price floor
- Anchor Liquidity - Active trading range liquidity
- Discovery Liquidity - Liquidity at upper ranges for price discovery
- Foundry
- Node.js >= 18.0.0
# Clone the repository
git clone https://github.com/oikos-cash/core-contracts.git
cd core-contracts
# Install dependencies
forge install
# Build contracts
forge build# Run all tests
forge test
# Run specific test file
forge test --match-path test/Lending.t.sol
# Run with verbosity
forge test -vvvv
# Run invariant tests
forge test --match-contract Invariant
# Gas report
forge test --gas-reportforge coverage --report lcov# Deploy to BSC mainnet
forge script script/deploy/DeployFactory.s.sol:DeployFactory \
--rpc-url https://bsc-dataseed.binance.org \
--broadcast \
--verify- QuillAudits - View Report
- Reentrancy Guards - All external calls protected
- Access Control - Role-based permissions via modifiers
- TWAP Oracles - MEV-resistant price feeds
- Slippage Protection - Configurable deviation thresholds
- Emergency Functions - Protocol pause capabilities
For responsible disclosure of security vulnerabilities, please contact: security@oikos.cash
All contracts are verified on BscScan. Source code matches deployed bytecode.
# Verify a contract
forge verify-contract <ADDRESS> src/path/Contract.sol:Contract \
--chain 56 \
--etherscan-api-key <API_KEY>| Parameter | Description | Default |
|---|---|---|
loanFee |
Daily loan fee (basis points) | 57 (0.057%) |
twapPeriod |
TWAP lookback period | 120s |
maxTwapDeviation |
Max price deviation (ticks) | 200 (~2%) |
minDuration |
Min presale duration | 3 days |
maxDuration |
Max presale duration | 90 days |
interface IVault {
function pool() external view returns (IUniswapV3Pool);
function getFloorLiquidity() external view returns (uint256);
function getCeilingLiquidity() external view returns (uint256);
function getOutstandingLoans() external view returns (uint256);
}interface IOikosFactory {
function deployVault(VaultDeployParams memory params) external returns (address);
function getVaultFromPool(address pool) external view returns (address);
function getProtocolParameters() external view returns (ProtocolParameters memory);
}├── src/
│ ├── bootstrap/ # Presale contracts
│ ├── controllers/ # Supply & dividends controllers
│ ├── errors/ # Custom error definitions
│ ├── factory/ # Factory contracts
│ ├── interfaces/ # Contract interfaces
│ ├── libraries/ # Shared libraries
│ ├── model/ # Pricing models
│ ├── staking/ # Staking contracts
│ ├── token/ # OKS token implementations
│ ├── types/ # Type definitions
│ └── vault/ # Vault facets & upgrades
├── script/ # Deployment & operation scripts
├── test/ # Test suite
└── lib/ # External dependencies
- OpenZeppelin Contracts - Security primitives
- OpenZeppelin Upgradeable - Proxy patterns
- Uniswap V3 Core - AMM integration
- Uniswap V3 Periphery - Helper contracts
- Solmate - Gas-optimized primitives
- Forge Std - Testing utilities
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Website: https://oikos.cash
- Documentation: https://docs.oikos.cash
- Twitter: @oikoscash
- Discord: discord.gg/oikos
- GitHub: github.com/oikos-cash
Built with love by the Oikos team
