How does it work?

  1. Address Search

    Input Parameters
     - Node (Address Id)
     - Hops (Number of Hops to perform traversal upto) = Default: 5
     - Megahubs (Integer number of counterparties for a node to be considered a megahub) = Default: 10,000
     - Threshold % = Default: 0.0001
     - Threshold USD = Default: 0.01
     
     Psuedo-Code (Ex: For Incoming Exposures)
     - 1. Given an address (X_0) calculate its metrics such as 
         - Latest Txn Time, Earliest Txn Time, Total Incoming Coin, Total Outgoing Coin
           Total Incoming USD, Total Outgoing USD, Owner Tags, User Tags
           - If X_0 is not a megahub, values are computed online and in real-time
           - If X_0 is a megahub, values are retrieved from a pre-computed store and
             are not real time
         - A global variable @hop_iteration is set to 1 
         - A property of @scaled_value_usd is set to total_incoming_usd for X_0
     - 2. For the search address X_0, Find all Counterparties who have sent it greater
          than [Threshold USD]
     - 3. if X_0 is a megahub and @hop_iteration = 1
            - Direct Exposure is retrieved from a pre-computed & stored value which 
              is calculated once a day
          if X_0 is not a megahub
            - Direct Exposure is calculated online by identifying all links to 
              counterparties which contain a tag
            - All counterparties which do not contain a tag are now set to a new
              variable X_1, and for each node in X_1, a property `@is_megahub` is 
              set (this property identifies if that address has too many links)
            - For all addresses in X_1, a properly `@scaled_value_usd` is set to 
              value of link from X_0 to each address in X_1
            - For all addresses in X_1, a property `@damping_ratio` is set to 
            `party.@scaled_value_usd / party.total_incoming_value_usd * link.total_value_usd / counterparty.total_incoming_value_usd`
            - The global property @hop_iteration is now incremented to 2
    Repeat the next set of steps until @hop_iteration > Hops (default: 5)
      - 4. If X_1 is a megahub and @hop_iteration > 1
            - Indirect Exposure is retrieved from pre-computed value for x_1
              indirect_exposure = @damping_ratio * direct_exposure
           If X_1 is not a megahub and @hop_iteration > 1
            - InDirect Exposure is calculated online by identifying all links to 
              counterparties which contain a tag
              indirect_exposure = @damping_ratio * link_value_usd
            - The variable X_2 is now set to all counterparties which do not 
              contain a tag and for each node in X_2, a property `@is_megahub` is 
              set (this property identifies if that address has too many links)
            - For all addresses in X_2, a properly `@scaled_value_usd` is set to 
              value of link from X_1 to each address in X_2
            - For all addresses in X_2, a property `@damping_ratio` is set to 
            `party.@scaled_value_usd / party.total_incoming_value_usd * link.total_value_usd / counterparty.total_incoming_value_usd`
            - The global property @hop_iteration is now incremented by 1
            - From X_2, filter out all nodes who do not satisfy
              party.@scaled_value_usd > party.total_incoming_value_usd * THRESHOLD_PCT,
              i.e. if the contribution from an address is neglibigle compared to 
              its other activities, ignore it. This is going to be true for 
              hot wallets of exchanges for example
            - X_1 = X_2 and continue iteration until @hop_iteration > Hops or
              number of elements in X_1 becomes 0
    CODE
  2. Transaction Search