Legal Oracle
The parameter supply that keeps PCL's rules current with regulation — without touching the policy engine itself.
Regulations change. Travel-Rule thresholds shift, sanctions lists update, jurisdictional rules evolve. Maroo separates the policy engine (PCL — stable, rarely changes) from the parameter supply (Legal Oracle — updated as laws and regulations evolve). New regulatory requirements are absorbed by adding a parameter, updating a shared address list, or — at most — registering a new PolicyTemplate, without touching chain core code. On maroo-testnet-1 these parameters — the global policy config — are set by the PCL policy admin, a single account; governance controls the module parameters, including which account is the policy admin. Every change is an on-chain transaction, visible and auditable.
What flows through the Legal Oracle
- Sanctions list changes for
DENY_LIST_POLICYand gating list changes forALLOW_LIST_POLICY— the list is a separate, shared registry entry referenced bylistId, and members are added or removed throughIPcl.updateAddressList(listId, add, remove)without rewriting any PolicySet. A list can be temporarily disabled withIPcl.setAddressListStatus(listId, Disabled), which makes any referencing policy revert withAddressListDisabled(listId)instead of evaluating membership. - New
maxLimit/minLimitvalues forVOLUME_POLICY. - New period definitions and limits for
PERIODIC_VOLUME_POLICY. - New schema UIDs for
EAS_POLICY(for example when a new KYC tier is rolled out). - New parameters for newly-registered policy templates.
It does NOT supply: new policy logic (that requires a network upgrade), private user data, or anything that bypasses the standard PCL evaluation pipeline.
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { iPclAbi } from "@maroo-chain/contracts/abi/precompiles/pcl/IPcl";
const PCL = "0x1000000000000000000000000000000000000005" as const;
// The list admin (NOT the policy admin — ownership of a list is separate)
// rotates its members here. Any policy referencing listId picks up the change
// immediately on its next evaluation.
const wallet = createWalletClient({
account: privateKeyToAccount(process.env.LIST_ADMIN_KEY as `0x${string}`),
transport: http("https://rpc-testnet.maroo.io"),
});
// TODO: replace with the sanctioned address being added before production.
const sanctioned = "0x3a9c71e4b8d2f6a05c7e19b4d3f82a6c5e0b9d47";
const add: `0x${string}`[] = [sanctioned];
const remove: `0x${string}`[] = [];
await wallet.writeContract({
address: PCL,
abi: iPclAbi,
functionName: "updateAddressList",
args: [42n, add, remove], // listId 42: the sanctions list
}); Authority and key management
IPcl.policyAdmin()), a single account, through the PCL precompile. A contract's own policies are set by that contract's policy admin; this account can change them only where it is also that admin, as it is on maroo-testnet-1 for the Privacy precompile. A shared address list has its own admin, set when the list was created and rotated via IPcl.changeAddressListAdmin — this is intentionally separate from the policy admin so the party that curates a sanctions list (for example) does not need chain-wide policy authority. Governance controls the x/pcl module parameters, including which account is the policy admin, so it can rotate that key. From a dApp builder's perspective the important property is that every change is an on-chain transaction (with a timestamp), so you can watch for it. The exact key-management flow lives outside the dApp surface area.Why this separation matters for developers
1. Policies are not static. A
VOLUME_POLICY your dapp depends on may have its maxLimit changed when the PCL policy admin publishes a new global policy config (setGlobalPolicies), and the membership of a DENY_LIST_POLICY can change at any time through IPcl.updateAddressList without any PolicySet being rewritten. Don't hard-code parameter values into your UI; query them from the chain (or test a concrete amount by simulating the transaction with eth_estimateGas, which reverts with a PCL ReasonCode when a policy rejects it; m-aws policy.preflight does not evaluate PCL policies — it checks an agent's own spending limit and allowed targets off-chain).2. Compliance is a moving target. Regulations that don't apply today may apply tomorrow. Building on PCL means you inherit the chain's compliance posture as it evolves — you don't have to track every regulatory change yourself.
3. Audit and predictability. Because parameter changes and address-list updates are on-chain transactions, they're public and dated, and the list-registry writes emit typed events (
AddressListMembersAdded, AddressListMembersRemoved, AddressListStatusChanged). You can reason about "the rules in effect at block N" with the same auditability as any other on-chain state.