AdCoreLib is a library of core functions for advertising software, intended for personal and company use. It supports the development of internal advertising services but prohibits providing commercial services to other companies and individuals.
This project contains common library packages for advertising software.
- CommissionShareFactor: Represents the internal commission of the system.
- RevenueShareFactor: Represents the revenue of the publisher or advertiser.
RevenueShareFactor is calculated as:
RevenueShareFactor = 1.0 - CommissionShareFactor
For example, if:
- CommissionShareFactor = 10% (0.1)
- RevenueShareFactor = 90% (0.9)
- RevenueShareReduce = 10%
The new price calculation:
newPrice = (price * (1 - RevenueShareReduce)) - (price * CommissionShareFactor)
For example:
newPrice = price * (1 - 0.1) * (1 - 0.1) = 0.81
Source:
CommissionShareFactor
andRevenueShareReduce
newPrice = (price * (1 - RevenueShareReduce)) - (price * CommissionShareFactor)
Target (Zone + Site, AccessPoint{DSP}):
CommissionShareFactor
andRevenueShareReduce
publisherPrice = price - (price * CommissionShareFactor) - (price * RevenueShareReduce)
If the target has a fixed view price, that value can be used instead. If the target is an AccessPoint, RevenueShareReduce
will reduce discrepancy.
We have two types of commissions:
- From source to reduce discrepancy between buyer (DSP) and seller.
- From target.
CorrectedSourcePrice = OriginalSourcePrice - Discrepancy
CorrectedPrice = CorrectedSourcePrice - TargetShareReduce
ComissionPrice = CorrectedPrice % (1 - RevShare)
PurchasePrice = CorrectedPrice - ComissionPrice
- Add documentation
- Reorganize package structure
Copyright 2024 Dmitry Ponomarev & Geniusrabbit
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.