Simulation of Commission Design: Part 1
By: Jeffrey Lim
Tags: Agent Based Modeling, Simulation, Reinforcement Learning, Blockchain, Machine Learning

Simulation Environment Setting

Let’s look into the simulation environment setting.

Number of agents: Refers to the number of network users (simply put, buyers)

Episode: Each episode starts from the beginning of a deal, agents’ decisions, distribution of commission points, and closure or timeout of a deal.

Mechanism: The simulation was conducted with different kinds of commission point distribution methods (random, uniform, decreasing, increasing, convex, and concave types).

Commission pool: Refers to the total amount of commission points to drive buyer participation.

Sales quantity: Refers to the total amount of goods. Early on, this would be seen as inventory.

Price: Refers to the price of each item.

Purchasing unit: Refers to the unit of goods a buyer can purchase. For instance, if the purchasing unit is 5, buyers can buy in increments of five (5, 10, 15, and so on).

Maximum purchasing quantity: The maximum amount of goods a buyer can purchase. In this simulation, each buyer can only buy once per deal, meaning that if a buyer wants to buy a total of 20ea, they have to place an order of 20ea, not two orders of 10ea.

Deal time: The duration of which a deal is in progress and ends with a timeout

Buyers would want to maximize their gains by subtracting their opportunity cost of making a deposit from the commission points they will receive. As episodes progress, we programmed the agents (buyers) to learn how many goods to buy at what point in time.

Commission Point Distribution Method

As mentioned above, we used random, uniform, decreasing, increasing, convex, and concave types of commission point distribution. Details of each type is as follows:

Random

The ratio of commission points a buyer can receive at a certain amount of remaining goods is set as random in the beginning of the simulation.

For instance, let’s say the number of sales (N) is 10 and the commission point ratio is allocated like [0.1, 0.2, 0.4, 0.5, 0.9, 0.3, 0.3, 0.3, 0.8, 0.2]. If a buyer purchases 3ea at 10 remaining goods, the calculation for commission points would be:

Uniform

Commission points are proportional to the number of purchased goods. If the number of sales is N and an agent bought M, the benefit can be calculated as follows:

Decreasing and Increasing

The decreasing type distributes commission points based on a increasing function with the amount of remaining goods as the x axis. The linear increase can be considered a linear function. The current remaining goods is S and the number of purchased goods is M.

The angle (a) and y-intercept (b) all have positive values. The more remaining goods, the more more commission points you can receive. As the deal progresses — as goods are sold — the number of commission points you can get decreases gradually.

The increasing type can be seen as a decreasing function. The basics are the same as an increasing function but the angle (a) takes a negative value. Also, for the x value in between 0 and the number of sales (N), the y value has to be bigger than 0.

Convex and Concave

The convex and concave types display a quadratic function that is symmetrical of half of the sold goods (N/2). Yet, in the convex type, the curvature (a) is larger than 0 whereas the concave type has a curvature (a) smaller than 0. In every possible x value, the y value has to be larger than 0.

The gain can be calculated with the following formula:

Cost

The opportunity cost is determined based on how interest rates are calculated. Committing to a deal early and depositing tokens renders more cost. Additionally, each agent have different interest rates.

Distribution of Credit

Interest rate based on credit rating (Source: Korea Federation of Banks)

Each agent is assigned to a credit rating from 1 to 10 based on statistical data regarding credit scores (December 2018). Five top banks based on total asset holdings were chosen based on the September 2018 Financial Supervisory Service’s financial information statistics system. The average rate of the loan interest rates of these banks was used.

Reward

The reward that an agent receives is equal to benefit subtracted by cost. Each agent studies to maximize their reward.