InvestmentPool Contract
The InvestmentPool contract manages individual investment pools with specific terms, lock periods, and guaranteed returns. Each pool operates independently with its own configuration, multisig governance, and LP token system.Implementation Address (Testnet):
0xed9dFc96392BFcD90610A85d72E79e6c40eDf5ACImplementation Address (Mainnet): 0xdFBB45185a56C4AD1e9bCE5FD784e3C4B5aFD09DOverview
Investment pools are the core building blocks of EdenVest, where users can:- Deposit cNGN for fixed-term investments
- Earn guaranteed returns based on predetermined APY
- Receive LP tokens representing pool shares
- Get NFT positions for investment tracking
- Withdraw at maturity with principal + returns
Pool Architecture
Key Features
🎯 Fixed-Term Investments
- Lock periods from 7 days to 2 years
- Guaranteed APY rates
- Simple interest calculations
- Automatic maturity tracking
💰 LP Token Economics
- ERC20 tokens representing pool shares
- Proportional minting based on pool state
- Burn on withdrawal
- Tax collection integration
🔒 Multi-Signature Security
- Pool funds managed by multisig wallet
- Admin functions require proper authorization
- Emergency pause capabilities
- Configurable governance parameters
Pool Configuration
PoolConfig Structure
Configuration Examples
Core Functions
Investment Functions
invest()
Process investment deposits (called by EdenCore).
- Validate investment amount and pool state
- Calculate LP tokens and tax amount
- Create investment record
- Mint LP tokens to investor and tax collector
- Mint NFT position to investor
- Transfer funds to pool multisig
tokenId: NFT position token IDuserLPTokens: LP tokens minted to investortaxAmount: LP tokens minted for tax collection
withdraw()
Process investment withdrawals (called by EdenCore).
- Investment must be matured (
block.timestamp >= maturityTime) - Investor must own the NFT position
- Sufficient LP tokens must be provided
- Investment must not already be withdrawn
Administrative Functions
updatePoolConfig()
Update pool configuration parameters.
- Lock duration: 7 days ≤ duration ≤ 2 years
- Min investment must be > 0
- Max investment must be ≥ min investment
- Expected rate must be ≤ 100% APY (10000 basis points)
setAcceptingDeposits()
Toggle deposit acceptance.
updatePoolMultisig()
Change pool multisig wallet address.
View Functions
getPoolConfig()
Retrieve current pool configuration.
getInvestment()
Get investment details by ID.
getPoolStats()
Get comprehensive pool statistics.
getUserInvestments()
Get all investment IDs for a user.
isWithdrawable()
Check if an investment can be withdrawn.
Return Calculations
Expected Return Formula
LP Token Calculation
Tax Calculation
Integration Examples
Pool Interaction
Pool Monitoring Dashboard
Security Features
Access Control
Input Validation
Emergency Controls
- Pause Mechanism: Stop new investments during emergencies
- Multisig Protection: Critical functions require multisig approval
- Admin Override: Emergency withdrawal capabilities
- Upgrade Safety: Proper storage layout maintenance
Events
Investment Events
Administrative Events
Best Practices
For Pool Administrators
- Regular Monitoring: Track pool utilization and performance
- Multisig Management: Ensure sufficient multisig wallet balance
- Configuration Updates: Adjust parameters based on market conditions
- Emergency Preparedness: Have pause/unpause procedures ready
For Developers
- Error Handling: Always check transaction success and revert reasons
- Event Monitoring: Subscribe to relevant events for real-time updates
- Gas Optimization: Batch multiple operations when possible
- Testing: Comprehensive test coverage for all scenarios
For Users
- Due Diligence: Review pool configuration and multisig setup
- Diversification: Spread investments across multiple pools
- Maturity Planning: Track investment maturity dates
- NFT Security: Secure your position NFTs in safe wallets
LP Token System
Understand the LP token mechanics and economics
NFT Positions
Learn about investment position NFTs and rendering
Pool Factory
Discover how pools are created and deployed
Investment Guide
Step-by-step guide to making investments

