Matador Docs
Asset Management

Mandates & Constraints

Defining the "rules of the road" for asset managers.

Mandates & Constraints

A "Mandate" is the set of rules an asset manager agrees to follow. In traditional finance, this is a legal document. In Matador, it is a smart contract policy.

Types of Constraints

1. Universe Constraints (Allowlists)

Restricting what can be traded.

    import "abis/UniswapRouter.json" as Uniswap;

    permission UniverseGuard -> 1.0.0 {
        parameters: {
            router: address,
            tokenA: address,
            tokenB: address
        }

        when: {
            context.target == parameters.router,
            Uniswap.exactInputSingle(params: tuple),
            any {
                all {
                    calldata.params.tokenIn == parameters.tokenA,
                    calldata.params.tokenOut == parameters.tokenB
                },
                all {
                    calldata.params.tokenIn == parameters.tokenB,
                    calldata.params.tokenOut == parameters.tokenA
                }
            }
        }
    }

2. Concentration Constraints (Risk Limits)

Restricting how much exposure is allowed.

    permission ConcentrationLimit -> 1.0.0 {
        parameters: {
            asset: address,
            maxBalance: uint256
        }

        when: {
            balance_check(
                token: parameters.asset,
                account: context.account,
                value: parameters.maxBalance,
                operator: lte
            )
        }
    }

3. Execution Constraints (Slippage/Price)

Restricting execution quality.

    import "abis/UniswapRouter.json" as Uniswap;

    permission SlippageGuard -> 1.0.0 {
        parameters: {
            router: address,
            minAmountOut: uint256
        }

        when: {
            context.target == parameters.router,
            Uniswap.exactInputSingle(params: tuple),
            calldata.params.amountOutMin >= parameters.minAmountOut
        }
    }

Combine constraints for mandates

Real mandates typically stack universe, concentration, and execution constraints in a single policy.

Policy Composition

You can combine these constraints into a comprehensive mandate.

graph TD
    A[Manager Tx] --> B{Universe Check}
    B -- Fail --> R[Revert]
    B -- Pass --> C{Concentration Check}
    C -- Fail --> R
    C -- Pass --> D{Slippage Check}
    D -- Fail --> R
    D -- Pass --> E[Execute Trade]

This layered approach ensures that even if a manager makes a "fat finger" mistake or acts maliciously, the fund's core invariants are preserved.

On this page