Matador Docs
DAO Treasury Ops

Recipe - Milestone Unlocks

Releasing funds based on verified progress.

Recipe: Milestone Unlocks

This policy enforces that a grant recipient only receives funds after a trusted third party (an "Attestor" or Oracle) certifies that a milestone has been reached.

The Strategy

Setup: Grant is created with a total amount and a specific Attestor.

Work: Grantee does the work.

Attestation: Attestor signs a message or calls a contract to mark "Milestone 1 Complete."

Payout: Grantee claims funds. Matador verifies the attestation.

Attestors are explicit

The policy ties payouts to a specific registry or oracle, removing ambiguity about who can validate milestones.

The Policy

import "abis/MilestoneRegistry.json" as MilestoneRegistry;

permission MilestoneRelease -> 1.0.0 {
    parameters: {
        registry: address,
        grantId: uint256,
        milestoneIndex: uint256
    }

    pub fn milestoneComplete(complete: bool) -> bool {
        return complete;
    }

    fn main() -> bool {
        if (context.target != parameters.registry) {
            return false;
        }

        if (context.selector == MilestoneRegistry.release) {
            if (MilestoneRegistry.release.grantId != parameters.grantId) {
                return false;
            }

            return MilestoneRegistry.release.milestoneIndex == parameters.milestoneIndex;
        }

        return false;
    }
}

Integration

This creates Accountability. The funds are committed, so the grantee knows they exist, but they are locked, so the DAO knows they won't be wasted on non-performance.

On this page