> For the complete documentation index, see [llms.txt](https://docs.fairway.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fairway.global/developers/build-on-evm/attestation-led-compliance-eas-erc-1271-erc-3643/policy-engine-interface.md).

# Policy Engine Interface

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IPolicyEngine {
    function isEligible(address subject, bytes calldata rule)
        external view returns (bool ok, uint32 reason);
}

```

Rule encoding example:

```solidity
abi.encode(
    policyId,
    attestationUID,
    expectedEpochRoot,
    maxKycAge // e.g. 180 days
);

```
