Demand-Side Platform needs to pay Supply-Side Platform each time its Creative is chosen to be displayed on a Site.

The amount of this payment depends on the number of Impression Events and Conversion Events that have taken place in a given time interval.

From the technical perspective, the payment takes place between Demand-Side Platform and Supply-Side Platform, but the actual payer is Advertiser, whereas the actual payee is Publisher.

Also, the cost for an Advertiser is a bit higher than the income of a Publisher due to the fact that some deductions take place, as described in the Money Flow section.

The following diagram presents an overview of the payment process:

skinparam monochrome true

actor       "Publisher"                 as publisher
collections "Supply-Side\nPlatforms"    as SSP
participant "ADS Blockchain"            as blockchain
collections "Demand-Side\nPlatforms"    as DSP
actor       "Advertiser"                as advertiser

==Outgoing payments==

advertiser -> DSP: Deposit funds
loop every 1 hour
    DSP -> DSP: Payment Report
    DSP -> DSP: Calculate payments
    DSP -> blockchain: Send multi transaction

==Incoming payments==

loop periodically
    SSP -> blockchain: Fetch transactions
    blockchain --> SSP: List of transactions
    SSP -> SSP: Analyze transactions

    SSP -> DSP: Fetch Payment Report
    DSP --> SSP: Payment Report
    SSP -> SSP: Analyze Payment Report
SSP -> publisher: Collect funds