Matador Docs
Institutional Compliance

Recipe - Counterparty Screening

Enforcing KYC/KYB checks on every transfer.

Recipe: Counterparty Screening

This policy enforces that funds can only be sent to addresses that possess a valid Identity Token (e.g., a Soulbound Token representing KYC status).

The Strategy

Define Oracle: Trust a specific Identity Provider contract.

Inspect Recipient: Check if the to address has a balance of the ID token.

Enforce: Revert if balance is 0.

KYC stays in sync

When counterparties lose their credential, policy enforcement updates automatically.

The Policy

permission CounterpartyKyc -> 1.0.0 {
    parameters: {
        token: address,
        recipient: address
    }

    pub fn recipientKycOk(balance: uint256) -> bool {
        return balance > 0;
    }

    fn main() -> bool {
        return context.target == parameters.token;
    }
}

Integration

This replaces "manual address whitelisting." Instead of updating a whitelist every time you have a new counterparty, you simply require them to get verified by your provider. Once verified, they are automatically allowed.

On this page