bitburner-official / bitburner-src

Bitburner source code.
Other
846 stars 274 forks source link

Is the earnings as a shareholder calculation bugged? #733

Closed psznm closed 8 months ago

psznm commented 1 year ago

Related data:

Owned stock shared: 560e6 Dividends per share: 3.834 / sec Your earnings as shareholder: 6.03e7 / sec

I could not find a reasonable way how this was calculated, so i have inspected the code. From the code I have found out that the default tax rate is 15%. There are some multiplications and divisions by 10 to account for market cycle length. The resulting formula is ((560e6 * 3.834 * 10)^0.85) / 10 = 6.05e7

There is a little difference but I assume that is just due to some rounding error.

Now there are two unlocks to "Reduce dividend tax rate by X%". for 5% and 10%.

If I reduce the tax rate by 5%, something completely unexpected happens. ((560e6 * 3.834 * 10)^0.9) / 10 = 1.99e8

My incomes have more than tripled, instead of gaining expected ~5%.

If I reduce the tax rate by another 10% ((560e6 * 3.834 * 10)^1) / 10 = 2.15e9

My incomes, now with 0% tax have became almost 11x greater than before with 10% tax, or around 35x greater than with base 15% tax. This seems to be very unreasonable and very unexpected.

Obviously what seems to be very suspicious here is dividendsPerCycle^(1-tax) as it seems it should actually be dividendsPerCycle * (1-tax)

Caldwell-74 commented 1 year ago

softcap is meant to be a power calculation also there is a more or less small "bug" or atleast misrepresentation because what the UI shows as per second gain and what you really get per second differs when you pay tax or are in a node with nerfed softcap

catloversg commented 8 months ago

@psznm: Please check #1160. @d0sboots: I think we can close this issue. It is the same as the linked issue.