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
