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
    }

    when: {
        context.target == parameters.registry,
        calldata.grantId == parameters.grantId,
        calldata.milestoneIndex == parameters.milestoneIndex,
        MilestoneRegistry.isMilestoneComplete(
            grantId: parameters.grantId,
            milestoneIndex: parameters.milestoneIndex
        )
    }
}

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