Documentation

How to get it all working

This documentation is a work in progress and refers to our version of the oracle that is accessible through the Ropsten testnet. For specialized implementations for your particular use case, please contact us for more information.

Introduction

Getting started

We offer risk APIs for the following use cases:


Stolen Fund Detection

Getting the risk score

Solidity

Coming soon.

Javascript: Sending the query

const web3 = new Web3("https://ropsten.infura.io/v3/<infura_project_id>");
const oracleABI = [ { "inputs": [ { "internalType": "address", "name": "_acceptedTokenAddress", "type": "address" }, { "internalType": "uint256", "name": "_price", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "callerAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "tx", "type": "string" } ], "name": "GetDataEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "userAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "tx", "type": "string" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "tier", "type": "string" } ], "name": "GetDataUserEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "veterokData", "type": "string" }, { "indexed": false, "internalType": "address", "name": "callerAddress", "type": "address" } ], "name": "SetDataEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "veterokData", "type": "string" } ], "name": "SetDataUserEvent", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "_newTokenAddress", "type": "address" } ], "name": "changeAcceptedTokenAddress", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "destroy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getAnsweredListDefi", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getAnsweredListUser", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_tx", "type": "string" } ], "name": "getData", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_tx", "type": "string" } ], "name": "getDataUser", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getIDInfoDefi_Address", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getIDInfoDefi_ID", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getIDInfoDefi_Price", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getIDInfoDefi_TX", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getIDInfoUser_Address", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getIDInfoUser_ID", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getIDInfoUser_Price", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getIDInfoUser_TX", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getPendingListDefi", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getPendingListUser", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "destinationAddress", "type": "address" } ], "name": "moveETHFunds", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "address", "name": "destinationAddress", "type": "address" } ], "name": "moveTokenFunds", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_veterokData", "type": "string" }, { "internalType": "address", "name": "_callerAddress", "type": "address" }, { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "setData", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_veterok_data", "type": "string" }, { "internalType": "uint256", "name": "_id", "type": "uint256" }, { "internalType": "address", "name": "_address", "type": "address" } ], "name": "setDataUser", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_price", "type": "uint256" } ], "name": "updatePrice", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "viewAcceptedTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "viewDataUser", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "viewPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "stateMutability": "payable", "type": "receive" } ];
const addr = "0xDad284E6C4b4a1C0C84fd7525ABA2bE52C4A5530";
const oracleContract = new web3.eth.Contract(oracleABI, addr);
oracleContract.methods.getDataUser("[]"+addressToCheck).send({'from' : account});
                        

Once the query has been submitted, the response will be ready two blocks after submission.

Javascript: Checking the result

oracleContract.methods.viewDataUser().call({'from': account}, function(error, res) {
    if (error != null) {
        console.log(error)
        return;
    }
    // Do something with results
    console.log("Results:", res)
});
                        

How to use the results

If the queried address has any association with a hack, theft, or incident of fraud within a 20-hop distance, it will be returned formatted in a JSON-like format. These results can be transformed however you need client-side.

If there are no known associations detected, the result will be blank.

Sample result

'{"currency":"eth","address":"0x7ED1E469FCB3EE19C0366D829E291451BE638E59","taint":[{"name":"Upbit Hacker","distance":20},{"name":"Upbit Hacker","distance":20},{"name":"Upbit Hacker","distance":10}]}'
                        

Contract addresses

Network Address
Ropsten 0xDad284E6C4b4a1C0C84fd7525ABA2bE52C4A5530

Lending Risk

Coming soon.