Polyzoa

Polyzoa is an embedded anti-scam security layer within the core node infrastructure, automatically accessible to all Web3 services and ensuring default protection for connected dApps and wallets.
This api follows the json-rpc 2.0 specification. More information available at http://www.jsonrpc.org/specification.

pz_addressRiskScore
Risk

Calculates risk score for an address

Retrieves the risk score for the address if the address is known, otherwise calculate the risk score on the fly


Parameters
Name Type Constraints Description
params array
params[0] string minLength="42" An ETH address
params[1] string Wait for Prediction.,
if value is 'true', the system will return the result with the predicted value.,
if value is 'false' or omitted, the result with the predicted value will be available in a second call
Result
Name Type Constraints Description
result object
result.address string minLength="42" An ETH address
result?.risk_score float minimum="0", maximum="1" the risk score for the address in the range [0:1], with 0 meaning safe and 1 meaning critical.
result?.risk_level string a descriptive label for the risk level of this address
result?.blacklisted boolean if true, this address belongs to a blacklist
result?.whitelisted boolean if true, this address belongs to a whitelist
result?.is_token boolean if true, this address is a token
result?.is_contract boolean if true, this address is a contract
result?.is_processing boolean if true, the address is being processed, and its score will be available shortly
result?.reason string a short description of why the risk score cannot be calculated for this address
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "pz_addressRiskScore",
  "params": [
    "0xff54936b733c91354b9979198c798b75e3860d42",
    "true"
  ]
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "address": "0xff54936b733c91354b9979198c798b75e3860d42",
    "risk_score": 0,
    "risk_level": "SAFE",
    "whitelisted": true,
    "is_token": false,
    "is_contract": false,
    "is_processing": false,
    "reason": "Contract is not supported"
  }
}

pz_checkApprovals
Risk Approvals

Calculates risk score for the approvals granted by a given address

Retrieves the risk score for each of the approvals' spender if the spender is known, otherwise calculate the risk score on the fly


Parameters
Name Type Constraints Description
params array
params[0] string minLength="42" An ETH address
params[1] string Wait for Prediction.,
if value is 'true', the system will return the result with the predicted value.,
if value is 'false' or omitted, the result with the predicted value will be available in a second call
Result
Name Type Constraints Description
result array
result[0] object
result[0].token object
result[0].token.address string minLength="42" An ETH address
result[0].token.label string The token's label.
result[0].risk_level string a descriptive label for the risk level of this address
result[0].spender object
result[0].spender.address string minLength="42" An ETH address
result[0].spender?.risk_score float minimum="0", maximum="1" the risk score for the address in the range [0:1], with 0 meaning safe and 1 meaning critical.
result[0].spender?.risk_level string a descriptive label for the risk level of this address
result[0].spender?.blacklisted boolean if true, this address belongs to a blacklist
result[0].spender?.whitelisted boolean if true, this address belongs to a whitelist
result[0].spender?.is_token boolean if true, this address is a token
result[0].spender?.is_contract boolean if true, this address is a contract
result[0].spender?.is_processing boolean if true, the address is being processed, and its score will be available shortly
result[0].spender?.reason string a short description of why the risk score cannot be calculated for this address
result[0].allowance string The amount granted with the approval; if maximum, UNLIMITED is returned.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "pz_checkApprovals",
  "params": [
    "0xff54936b733c91354b9979198c798b75e3860d42",
    "true"
  ]
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "token": {
        "address": "0xff54936b733c91354b9979198c798b75e3860d42",
        "label": "USD Coin"
      },
      "risk_level": "SAFE",
      "spender": {
        "address": "0xff54936b733c91354b9979198c798b75e3860d42",
        "risk_score": 0,
        "risk_level": "SAFE",
        "whitelisted": true,
        "is_token": false,
        "is_contract": false,
        "is_processing": false,
        "reason": "Contract is not supported"
      },
      "allowance": "UNLIMITED"
    }
  ]
}

pz_checkBalance
Risk Balance

Calculates risk score for the tokens owned by a given address

Retrieves the risk score for each of the token if the token's address is known, otherwise calculate the risk score on the fly


Parameters
Name Type Constraints Description
params array
params[0] string minLength="42" An ETH address
Result
Name Type Constraints Description
result array
result[0] object
result[0].address string minLength="42" An ETH address
result[0].label string The token's label.
result[0]?.risk_level string a descriptive label for the risk level of this address
result[0]?.risk_score float minimum="0", maximum="1" the risk score for the address in the range [0:1], with 0 meaning safe and 1 meaning critical.
result[0].symbol string The token's symbol.
result[0].decimals int The token's decimal places.
result[0].balance int The amount of tokens owned, in the minimum unit.
result[0].is_native boolean if true, the balance refers to the native coin of the chain.
result[0].is_spam boolean if true, the token is a spam token, with no inherent value.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "pz_checkBalance",
  "params": [
    "0xff54936b733c91354b9979198c798b75e3860d42"
  ]
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "address": "0xff54936b733c91354b9979198c798b75e3860d42",
      "label": "USD Coin",
      "risk_level": "SAFE",
      "risk_score": 0,
      "symbol": "USDC",
      "decimals": 18,
      "balance": 77800000000000000000,
      "is_native": false,
      "is_spam": false
    }
  ]
}