<< Back to Warzone Idle Forum   Search

Posts 1 - 6 of 6   
Calculating Profit from Reselling Alloys: 2024-08-19 13:12:38


Jakim
Level 36
Report
Hello. I'm breaking down some individual aspects of Warzone Idle and framing them as mathematical problems that I plan to solve analytically.

Some of you have probably wondered how much you can earn by reselling purchased market items. I'm going to calculate the maximum profit for one alloy (or item) based on three assumptions:

1. The sell price of the alloy is c_1.
2. The initial market price is c_0, where c_0 < c_1.
3. The price increases by β with each alloy bought. More precisely, the cost of a single alloy depends on n and equals:
c_n = c_0 + β ⋅ n
Thus, the cost follows an arithmetic progression.
4. The game only shows an average cost c per alloy for a planned purchase of n items. The cost c depends on n.

TL;DR: You need to buy
n_0 = (n + 1) / 2 ⋅ (c_1 - c_0) / (c - c_0)
alloys to gain the profit:
P = n_0 ⋅ [c_1 - c_0 - (n_0 + 1) / (n + 1) ⋅ (c - c_0)]


Derivation:

1. If you plan to buy n alloys, the game only shows the average cost c per alloy. Let c be the average cost for n alloys. Then:
c ⋅ n = Σ_k=1^n (c_0 + β ⋅ k)
The sum of this arithmetic progression is
Σ_k=1^n (c_0 + β ⋅ n) = n / 2 ⋅ (β + 2 c_0 + β ⋅ n)
We can derive β from the equation:
c ⋅ n = n / 2 ⋅ (β + 2 c_0 + β ⋅n)
yielding:
β = 2 (c - c_0) / (n + 1)
Since the in-game values are shown rounded, this is only an approximation.

2. Using this, we can find the number n_0 of alloys for which the sell price equals the buy price. Beyond this point, selling alloys is no longer profitable. This number satisfies the equation
c_1 = c_0 + β ⋅ n_0
giving:
n_0 = (c_1 - c_0) / β


3. Now we can calculate the total profit. Each alloy is sold at a constant price c_1, and the cost of the bought alloys is the sum of an arithmetic progression:
P = c_1 ⋅ n_0 - Σ_k=1^n_0 (c_0 + β ⋅ n) = c_1 ⋅ n_0 - n_0 / 2 ⋅ (β + 2 c_0 + β ⋅ n_0)
Substituting β and simplifying (calculations omitted):
P = n_0 ⋅ [c_1 - c_0 - (n_0 + 1) / (n + 1) ⋅ (c - c_0)]
where n_0, by substituting the expression for β, is:
n_0 = (n + 1) / 2 ⋅ (c_1 - c_0) / (c - c_0)


All you need to know is: the average price c of an alloy for n items.

I hope I haven't messed anything up. I tested the formula only once in practice and worked fine.

Initially, I made a mistake assuming that the cost grows exponentially, looking at the percentage increase. But the price increases arithmetically instead. The profit does not depend on the batch size, that is amount of alloys you buy in a single transaction.

Edited 8/19/2024 13:19:22
Calculating Profit from Reselling Alloys: 2024-08-19 15:34:01


Jakim
Level 36
Report
Here's the calculator for you:
https://jakimpl.github.io/market_profit.html

Edited 9/8/2024 07:50:15
Calculating Profit from Reselling Alloys: 2024-08-19 18:18:04


FiveSmith 
Level 60
Report
Great effort.
I believe that this information has been known to Idle community, but still nice that someone refreshes it.

Yet, honestly, just by itself this info doesn't bring much practical value to a regular player. Mainly because there is a "more natural" ingame way to optimize purchases.

ALso the link doesnt open properly for me. Not sure, what other countries may be banned by you (or your hoster).
Calculating Profit from Reselling Alloys: 2024-08-19 20:06:54


JK_3 
Level 63
Report
How is that calculator supposed to work? You might need to add some explanations to make it idiot proof.

I was expecting to be able to input the current price and its sell price, and have it output how many I needed to buy.
Initial price and quantity are too much of a hassle to keep a track of for the vast majority of players.

Calculating Profit from Reselling Alloys: 2024-08-19 20:28:19


Jakim
Level 36
Report
JK_3. unfortunately you cannot simply input Initial Price and Sell Price, you need to know how the price grows, and you need both pieces of information for that. Select a resource, put the slider to maximum (without buying anything of course) and note both Cost Each and Quantity for the calculator.

Warning: For some resources you need a reasonable amount of items selected to properly estimate the price growth.

ALso the link doesnt open properly for me. Not sure, what other countries may be banned by you (or your hoster).


That's unfortunate, I have no control over that.

Edited 8/19/2024 21:06:43
Calculating Profit from Reselling Alloys: 2024-08-19 20:33:38


JK_3 
Level 63
Report
Select a resource, put the slider to maximum (without buying anything of course) and note both Cost Each and Quantity for the calculator.

Oh, it makes more sense when you say it like that. Like I said, calculator needs some idiot proofing 😅
Posts 1 - 6 of 6