Sending Payments#

The following diagram presents an overview of how Demand-Side Platform sends payments to corresponding Supply-Side Platforms:

skinparam monochrome true

participant "ADS Blockchain"                    as blockchain
participant "Demand-Side\nPlatform"             as DSP
participant "Demand-Side\nContext Provider"     as DSCP
participant "Ad Pay\nModule"                    as APM
actor       "Advertiser"                        as advertiser

advertiser -> DSP: Deposit funds
loop every 1 hour
    DSP -> DSCP: Get\nUser/Site/Device\nContext
    DSCP --> DSP: User/Site/Device\nContext
    DSP -> APM: Post User/Site/Device\nContext
    DSP -> APM: Post Impression Events
    DSP -> APM: Generate Payment Report
    APM --> DSP: Payment Report
    DSP -> DSP: Calculate payments
    DSP -> blockchain: Send multi transaction

Demand-Side Platform is expected to pay for displayed/converted Creatives by sending ADS payments to all Supply-Side Platforms that have been involved in displaying those Creatives to the User.

To fulfill those payments, every hour Demand-Side Platform generates a Payment Report which allocates the appropriate amount of ADS that it needs to pay to Supply-Side Platforms for utilizing their Sites within the last one-hour timeframe.

It’s important for Demand-Side Platform to store the generated Payment Reports because Supply-Side Platforms are expected to request those reports upon receiving their payments.

The actual task of generating Payment Reports can be done by Demand-Side Platform itself, or it might be outsourced by Demand-Side Platform to an external Ad Pay Module.

In case an external Ad Pay Module is utilized, Ad Pay Module needs to receive from Demand-Side Platform the following information:

The details of the communication between Demand-Side Platform and its Ad Pay Module are described in the Ad Pay Service section.

Ad Pay Module verifies the received Impression Events, and the outcome of this verification is contained in the Payment Report, i.e. Ad Pay Module includes a payment for an Impression Events in the Payment Report only if it’s able to verify that the event has actually occurred and was valid (not fake).

The generated Payment Report becomes the basis for Demand-Side Platform to proceed with executing payments. Payments are executed by Demand-Side Platform sending an ADS amount to a given Supply-Side Platform, i.e. transferring the appropriate amount of ADS to the Supply-Side Platform’s ADS Account address.


Demand-Side Platform knows the ADS Account address of a given Supply-Side Platform, as it has already been retrieved during the Synchronization stage.

The recommended operation for sending ADS payments is send_many.