Skip to main content
See below for reference implementations for third party policy data oracles that can be integrated into your Newton Protocol policy, from KYC to sanctions screening to historical APY. These reference implementations can be forked to meet the needs of your application — check out their docs to learn more. You can incorporate data from multiple sources to create a policy that suits the needs of your application.

Identity

Veriff

Veriff enables developers to build policies that use KYC data — specifically a user’s country of residence.

Persona

Persona is another service that can assist with applications that require KYC. In addition to country of residence, data such as a bot score and state of residence can be used as part of a policy.

Sanctions & Wallet Screening

Magic Labs

The security signals data policy provides a risk score for transacting with an address. This leverages onchain signals to determine how likely an address is to be malicious.

Chainalysis

Chainalysis provides useful insights into whether an address is sanctioned or not. This is valuable when complying with US OFAC sanctions regulations.

Human.tech

Human Passport (part of the broader human.tech suite of products) provides the infrastructure layer for verifying unique personhood across web3. Use it to implement sophisticated anti-Sybil and compliance controls without sacrificing user privacy or protocol decentralization.

Transaction Controls

Vaults.fyi

Vaults is a powerful service that returns data around yield and assets for particular vaults. This is useful for building AI agents that are seeking to optimize yield.

Massive

Massive (fka Polygon.io) is a sevice that provides a wealth of macroeconomic data. This policy data gives insights into US Treasury yields, useful if building an application that is protected against interest rate movement.

Etherscan

Gas price data can be retrieved from Etherscan and used as part of a policy. This is useful as a final check against expensive gas prices for transaction automation senarios.

Social

Neynar

Neynar is a data provider for Farcaster, a decentralized social media protocol. Their data is useful when building an agent that uses a user’s social score to make purchase decisions. For example, data like a bot score or follower count can be used as part of a policy.

How to Use These Oracles

To integrate a reference oracle into your project:
  1. Fork the reference implementation — clone the repo and copy the oracle’s directory into your project
  2. Configure secrets — add your API keys via Encrypting Secrets or pass them inline during simulation
  3. Build the WASM component — follow the language-specific guide (JavaScript, Python, Rust)
  4. Test locally — simulate the oracle with the Newton CLI:
    newton-cli --chain-id 11155111 policy-data simulate \
      --wasm-file policy.wasm \
      --input-json '{"address": "0x..."}'
    
  5. Deploy on-chain — use the CLI to upload your WASM to IPFS and deploy a PolicyData contract. See Deploying with CLI.
  6. Reference in your policy — access the oracle output in your Rego policy via data.data:
    risk_score := data.data.risk_score
    allow if risk_score < 50
    
For a full end-to-end walkthrough, see the Integration Guide.