Menu

#3108 "Stock market crash": price manipulation

Fixed_0.12.0
closed-fixed
nobody
None
3
2022-05-01
2017-10-25
No

Smart bug: I found a way how to "crash the stock market" in freecol.:) By that I mean obtaining unlimited amount of money in 0 turns.

Steps to reproduce:
- begin creating a new game
- choose difficulty "Very Hard", then change to "Custom"
- in Custom (which is currently equal to "very hard") change Other > Starting money = 20000
- choose Nation advantage: "Immigration". Important! Don't miss this step.
- start game
- go to Europe screen
- buy 1 galleon
- buy horses by packs of 100 (standard drag&drop) until price changes to 3/5. If you done everything correctly, it should be 6x100 horses
- sail away the first galleon and ignore it for further operations. For main activity, buy 1 more galleon and 1 caravel. You should have 1 galleon in port, 1 caravel in port and 1 galleon sailed away.
- activate your galleon that is currently in port
- you should have 6 slots available in it. Hold down Shift, drag&drop horses to the galleon. Choose amount: 600. You bought 600 horses for 5gold each.. Price should go up to 5/7
- activate Caravel. Buy 100 horses into it. You bought 100 horses for 7gold each. Price should go up to 7/9.
- activate Galleon. Sell 600 horses (same as last time, hold down Shift, drag&drop a horse from the galleon into Europe, choose amount 600). You sold 600 horses for 7gold each. If you've done everything correctly, price should drop down to 5/7.
- activate Caravel. Sell 100 horses. You sold 100 horses for 5gold each. If you've done everything correctly, price should drop down to 3/5.

Now, you can repeat the last 4 steps as many times as you want, and your gold amount will always increase. To understand why this happens, see how the main chunk of horses (6x100) is being sold and bought. As you see, they are bought for 5 gold each, but sold for 7 gold each. The price for the 100-horse pack is not in your favor, but you gain more on 600-horse operation than you lose by the 100. Anyway, it just works in practice, check out yourself.

Remark1: This technique works with other nations, too, but numbers differ slightly for "Trade" national advantage.

Discussion

  • vasya novikov

    vasya novikov - 2017-10-25

    Once the issue gets confirmed, we can discuss how to fix it.
    The easy&dirty fix would be to limit the number of goods that can be sold/bought simultaneously. Like, not allowing amounts bigger than 300. Another implementation might be to limit the number of items to "when price changes + 100". So if price changes when you buy 139 goods, allow 239 of this good to be bought simultaneously.

    Thoughts?

     

    Last edit: vasya novikov 2017-10-25
  • vasya novikov

    vasya novikov - 2017-10-25

    If anyone's interested in how much you can push this technique at. The optimal buying sequence seems to be: +600 +100 + 100 - 600 - 100 - 100. It works up to a tax rate of about 40% (40.9% IIRC). Each cycle gives you 2700 gold. The minimal amount of gold to make it work under such tax rate is about 7500 gold with free horse utilization and a free caravel, or 10500 with only caravel, or 11500 pure gold without any help of other ships.

     
  • Mike Pope

    Mike Pope - 2017-10-26

    The easy&dirty fix would be to limit the number of goods that can be sold/bought simultaneously. Like, not allowing amounts bigger than 300.

    IIRC sales should be limited to 100. This may have broken or been "optimized" away.

     
  • vasya novikov

    vasya novikov - 2017-10-27

    @Mike,

    Maybe you're right. I personally kinda like the fact that you can sell 400 goods simultaneously at better price, it seems natural to me. But without possibilities for exploitation. Then again, a limit of 100 has its own benefits, too.

    Talking about numbers, a value of 300 may disallow such an exploit already. I can find the exact value if needed.

     
  • vasya novikov

    vasya novikov - 2017-10-27

    I'm okay with limiting drag&drop quantities to 100 for Europe. IDK how to implement it myself tho.

     
  • Mike Pope

    Mike Pope - 2017-12-12

    After a regrettably long delay, git.16da4bb contains the fix discussed above. Let me know how it goes.

     
  • Mike Pope

    Mike Pope - 2017-12-12
    • status: open --> open-needs-info
     
  • vasya novikov

    vasya novikov - 2017-12-13

    @Mike, unfortunately, I don't play FreeCol that active anymore, so I guess we can mark the issue as fixed, and restore or raise a new issue if something will come up.

    // Exhaused early because winning at "maximum" difficulty was too easy, yet contaned many similar easy actions. Dunno how it would be with multiplayer, if it was alive. Sorry, anyway, I hope the project will live.

     
  • Mike Pope

    Mike Pope - 2017-12-14

    I guess we can mark the issue as fixed

    Done. Thanks for the bug reports.

     
  • Mike Pope

    Mike Pope - 2017-12-14
    • status: open-needs-info --> pending-fixed
    • Group: Current --> Fixed_trunk
     
  • Mike Pope

    Mike Pope - 2022-05-01
    • Group: Fixed_trunk --> Fixed_0.12.0
     
  • Mike Pope

    Mike Pope - 2022-05-01
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.