Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite money exploit in multiplayer using shares and sending money back and forth #7691

Closed
Wuzzy2 opened this issue Aug 13, 2019 · 10 comments
Closed

Comments

@Wuzzy2
Copy link

@Wuzzy2 Wuzzy2 commented Aug 13, 2019

Version of OpenTTD

1.9.2

Description

There's an exploit in multiplayer that allows you to add basically infinite amounts of cash to your company, adding 75% of your company cash each iteration out of thin air. This glitch requires an online multiplayer server and 2 companies you control.

Question: Is this now the correct place to post bugs? Is the old bugtracker dead?

Expected result

You can't generate money out of thin air in online multiplayer.

Actual result

You can generate money out of thin air in online multiplayer by abusing the company shares system in compination with the “give money to player” mechanic.

Steps to reproduce

  1. Join a vanilla multiplayer server (or start your own) and start a company, which we call LocustCorp
  2. Join the same server a second time (or find a friend to collaborate) and start another company, which we call FakeCorp
  3. Play with LocustCorp normally while with FakeCorp, you do nothing
  4. Play for long enough to unlock buying shares of FakeCorp
  5. As LocustCorp, buy 75% of shares of FakeCorp for nothing, because it's a dummy corporation
  6. Using the player list feature, send all of the money of LocustCorp to FakeCorp. This greatly increases the company value of FakeCorp
  7. As LocustCorp, sell all FakeCorp shares
  8. As FakeCorp, send all your money back to LocustCorp. If you did everything right, LocustCorp should now have about 75% more cash.
  9. Repeat steps 5 to 9 forever

Example

Let's assume that LocustCorp has $5,000,000 in the bank. So first you buy the FakeCorp shares for $0. Then you send $5,000,000 to FakeCorp, thus pushing the value of FakeCorp to (ca.?) $5,000,000. LocustCorp's bank is now empty. When LocustCorp now sells all shares, you win 75% of that value, so LocustCorp has now $3,750,000 in the bank. This is the money that appears out of thin air. Now FakeCorp sends all their cash back to LocustCorp, adding back you $5,000,000. LocustCorp has now $8,750,000 in cash.

Repeat forever for more cash.

Video

This glitch is being demonstrated by The Spiffing Brit in this video:
https://www.youtube.com/watch?v=M1YlJ9J7_Jo
The core exploit (steps 5-9) starts at 27:52. Anything before is just basically setting up the core company (steps 1-4).

Analysis

The main cause of this glitch is IMO that you can send money to other companies/players. Apparently cash directly affects the company value, which makes it possible to artificially inflate the company value (and thus shares value) trivially by simply dumping massive amounts of money into a company.

Note that in the original TTD, it was (to my knowledge) not possible to donate money to the other player.

One easy fix for this would be to just remove the possibility to send money to other companies. This would remove the possibility to inflate the company value.

@James103

This comment has been minimized.

Copy link
Contributor

@James103 James103 commented Aug 13, 2019

Another possible fix besides just removing the send money feature altogether would be to have the same two settings as we have for other large-scale actions such as clearing land and landscaping.

  • "give_money_frame_burst" would control how much money can be sent from a single company at once. Default value would be £10-20 million (same as now).
  • "give_money_per_64k_frames" would control how much money can be sent from a single company over some longer period of time. I think default value here would be ~£50-100 million.
@Eddi-z

This comment has been minimized.

Copy link
Contributor

@Eddi-z Eddi-z commented Aug 13, 2019

I think this is ultimately a social problem, not a technical one. That's why we have things like Bafin or the SEC to watch over financial irregularities (Think of this as an example of insider trading)

However, in my opinion, instead of forbidding sending cash (which might be a server setting), i think the cash/loan should simply not be included in the company value calculation. just the actual physical assets (vehicles, tracks, stations). this would also prevent the value staying at 2$ for a long time.

@nielsmh

This comment has been minimized.

Copy link
Contributor

@nielsmh nielsmh commented Aug 13, 2019

It's worth keeping in mind that the default value of economy.allow_shares is false, the default configuration of multiplayer games disallows buying company shares which is a prerequisite for this exploit.

Apart from that I'm generally of the same opinion as Eddi that the better fix (apart from doing nothing) would be to base company value, at least for shares price calculation, solely on fixed assets value, or possibly even on some other performance metric as well. Even then it could possibly be gamed.
Perhaps have company assets value and company valuation separate and only let the company valuation change at a limited rate, e.g. 1% per month.

The real proper fix would likely involve completely changing the financial model of the game to include double-entry bookkeeping for all assets, and proper shares ownership, including a general public body of investors you will need to convince to trade shares of a company with you at a given price.

@andythenorth

This comment has been minimized.

Copy link
Contributor

@andythenorth andythenorth commented Aug 14, 2019

IMHO leave this as is.

There's a pre-existing remedy for the problem in multiplayer by disallowing share trading on the server.

@Wuzzy2

This comment has been minimized.

Copy link
Author

@Wuzzy2 Wuzzy2 commented Aug 14, 2019

Am I the only one who sees a problem with infinite money? Money equals power and with infinite money you can basically wreck the whole world by screwing up the land all over. This is a desaster waiting to happen.

Yes, it requires these particular settings to be set, but no server owner will expect such an exploit.

I am, however, unsure about a “true” solution. :(

@Eddi-z

This comment has been minimized.

Copy link
Contributor

@Eddi-z Eddi-z commented Aug 14, 2019

... nobody said that there isn't a problem. the question is how to come up with a suitable solution.

@LordAro

This comment has been minimized.

Copy link
Member

@LordAro LordAro commented Aug 15, 2019

Also trying to pretend that (O)TTD is well balanced is somewhat of a waste of time. It's very easy to make a lot of money by doing very little

@AlanChatham

This comment has been minimized.

Copy link

@AlanChatham AlanChatham commented Oct 9, 2019

I wonder how people use shares in game? Is it mostly to be able to buy out competitors? What about these fixes:

  1. Add a bookkeeping item on the balance sheet as a balancing liability - you could call it Gifted Cash, Third-Party loan, or Unearned Revenue (from obvious to the player to more realistic). This would keep the value of the company from being messed with through gifted cash.

  2. Make the stock element a private sale situation, where if you buy stock, your payment goes to the bought company, and if you sell stock, the cash comes from that company.

Example: Company A buys 25% of Company B for $0 and Company B gains $0 cash. Then Company A gives $400,000 to Company B, raising Company B's value to $400,000 When Company A then sells its 25%, Company A gains $100,000, but Company B loses $100,000.

You could set it so that the target company has to agree to buy/sell shares, with AI players always accepting if they have the cash. This would make more sense overall, since if you're starting a company by getting a loan, you should be retaining 100% equity, and if there were shares on the market, where is the cash you got for selling them in the first place? You could even add on the ability for shareholders to restrict the actions of a held company, based on the amount of ownership, although this would probably go beyond the scope of the design goals. But, you could do something like 'no building within a certain radius of my stations', or a points-based system where each restriction costs different amounts of points to make a menu of restrictions your owners could put on you...

@ldpl

This comment has been minimized.

Copy link
Contributor

@ldpl ldpl commented Oct 9, 2019

I see it as a non-issue as well. Any decent competitive server have both shares and money transfers disabled. And on non-competitive ones money means nothing so no point "exploiting".

@andythenorth

This comment has been minimized.

Copy link
Contributor

@andythenorth andythenorth commented Oct 22, 2019

Thanks for this. This issue won't be addressed in vanilla OpenTTD. We try to keep the issue count low, so I'm closing this one. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.