MilestoneChecker
The MilestoneChecker
contract serves as a revenue-based vesting controller for IMO projects. It enforces project accountability by linking escrowed fund releases to specific revenue milestones, ensuring that project teams meet their promised revenue targets before receiving additional funding.
Key Features
Customizable revenue milestones.
Time-locked phases.
Revenue verification system.
Automated escrow releases.
Project-specific target setting.
Milestone Structure
The contract uses a phase-based system that can be customized per project.
Three phases are initialized by default:
Customization Options
Revenue targets can be set based on:
Project size.
Market expectations.
Revenue model.
Token economics.
Industry standards.
Time periods can be adjusted during deployment.
Contract Details
State Variables
Functions
Milestone Management
checkMilestone(uint256 _index)
Purpose: Verifies milestone achievement and releases funds.
Process Flow:
Validates milestone conditions.
Checks revenue targets to be met.
Triggers an escrow release upon success.
Requirements:
Milestone time has been reached.
Revenue target for the milestone is met.
Milestone has not been previously achieved.
Events Triggered:
MilestoneChecked
.FundsReleased
.
Configuration Functions
setMilestoneTargets(uint256[] calldata _targets)
Purpose: Sets the revenue targets for each milestone phase.
Access:
Owner
only.Validation:
Non-zero targets.
Matches phase count.
setIMOEndTime(uint256 _imoEndTime)
Purpose: Initializes milestone timeline.
Phase Setup:
Revenue Verification
getTotalRevenue()
Purpose: Fetches the current total revenue collected by the contract.
Returns:
Total revenue collected.
Success status.
Usage: Milestone verification.
View Functions
getMilestone(uint256 _index)
Purpose: Retrieves the details of a specified milestone.
Returns: Milestone information, including target revenue, scheduled time, and status.
getMilestonesCount()
Purpose: Returns the total number of milestone phases.
Events
Integration Points
RevenueTracker
Monitors revenue collection.
Provides verification data.
Must match revenue token.
EscrowVesting
Receives release authorizations.
Controls fund distribution.
Maintains vesting schedule.
Security Features
Access Control
Owner-only configuration.
IMOSale
authorization.Reentrancy protection.
Validation Checks
Revenue token matching.
Target validation.
Timeline verification.
Last updated