2/11/2023 Update: There had been a month-long hiatus due to the CF name change magic (and my own laziness oops), but everything has been fixed now :D! However, I know a lot of people have gone inactive due to the month-long market closure, so I am hoping to relaunch StonksCF in the near future with some new mechanisms (dividends, automatic algorithm trading, etc.). Let me know if you have any ideas! In the meantime, feel free to continue exploiting the way-over-inflated economy and embrace your inner capitalism >:D
Final Update: We now have our own DISCORD SERVER. Join us for the latest information and engage with the community at https://discord.gg/AeH2GTwkF5 All the announcements will be there instead of on this page
Greetings Fellow CodeForces users!
I am proud to introduce my latest project, CF Stonks (aka StonksCF), which is a virtual stock market based on your CodeForces rating.
Have you ever been thrilled by the ups and downs of CodeForces ratings? If so, you will love this project :D. On the website, you will automatically receive $$$200$$$ stocks of your own account (with the rest of the $$$800$$$ being sold on the market) and $$$10,000$$$ in cash upon registration. The price of each stock is based on your rating, so the higher the rating, the higher the price of a stock is. Furthermore, since crossing (or sometimes dropping) into a new division is so exhilarating, we aim to capture that excitement and give a $$$20$$$% boost between the ranks. The exact formula is $$$price = 1.2^{rank} \cdot rating$$$.
While the market is open (closed during contests), you can sell/buy other people's stock. Even though this is just a game, you can use the website as a source of motivation since people depend on you to not lose money 0_0.
So what are you waiting for? Try to become the wealthiest man on the website! More details on the game mechanics can be found on the about page
Special thanks to the Nimbus bot developed by gamesterrex and caoash , which serves as my primary inspiration behind this project.
Furthermore, all of the source code is public and available on GitHub here, so if you would like to contribute or give suggestions, please open an issue/pull request.
Good luck and have fun playing :D
Edit: The market has been closed for the Div 3 contest. Good luck to anyone taking!
Edit: Market has been reopened, marking the end of our first trading cycle and the beginning of the second! Have fun trading everyone
Edit: After 14 days of chaos due to New Years name change, the website has been fully fixed and updated! :D Happy trading
orz codetiger
Auto comment: topic has been updated by codetiger927 (previous revision, new revision, compare).
Very cool, would be cooler if I was allowed to keep 420% of my own stock.
Great idea! codetiger orz
What a fun website! I have thought about it but I was not able to do it.
Kinda cool
Could be even cooler if we actually trade futures with other players
Ohhhh yeah. That would be super cool. I will add that to the list of features I want to implement :p
now implement shorting
EDIT: I think line 218 here https://github.com/CodeTiger927/StonksCF/blob/main/backend/API.php#L218 the
$stock != $username
condition isn't working?EDIT: also i think it isn't good to transfer password hashes via POST directly, maybe authetication cookies are better
Oh thanks for reminding, I will fix the first problem now. Also yeah passing hashes into POST is probably not the best idea. I will try to fix that at some point too. Thanks for feedback :blobheart:!
Won't it be possible to manipulate the market by shorting yourself and then dumping your rating lol
For that other needs to buy your stock also
I can imagine this working if some GM+ participant creates an alt, getting single digit ranks in 2-3 Div2 and then trolls the next few rounds.
Haha, I was hoping people wouldn't dump their codeforces account just for a virtual game
agreed, I'd short myself to oblivion
OwO great project, especially how you handled the registration. Can't wait to pump and dump.
I loved this, theres one feature request: it would be nice if you add one button on the person's profile page which redirects to codeforces visualizer or simply their codeforces profile page(to analyze them more).
Very cool! The only possible issue I can see is that theoretically, someone could get very rich by smurfing?
Brilliant idea!
I think you could add market indexes statistic based on rank.
in my mind it would look something like this:
index | total worth | avg change (since last contest)
---------------------------------
GREY | $4,123,123.98 | +4.5%
GRN | $6,456,234.12 | -1.6%
...
YLW | $38,789,889.34 | +1.9%
RED | $59,987,902.69 | +0.7%
it wouldn't have much practical use but sounds like a fun thing to have
Ooooh yeah! That would be super cool statistics for global market growth and stuff. I will definitely include that in the next update.
Nice project. codetiger927 orz.
Is it possible to see how many users have purchased our stock (or something like that)?
Yeah, check owners in your profile.
Nice website, but when I open a new page, I'm logged out.
:sweat: so this is because I am too lazy to change the login to logout once you login :rooderp:. You don't get logged out until you click the logout button in profile. Sorry for the inconvenience, I will try to fix that soon
It's fixed, but only on the Profile page.
Also, I think the Register button should be hidden when you are logged in.
I'm almost 400 below my max rating, you can bet on me
losing moreAwesome project!!!!!!! Would have been more fun if there was real money.
rainboy plz register now and you'll be the focus of the game
LOL YES I SECOND THIS. (maybe I should just create a futures market specifically for rainboy where people can just bet on him xD)
He did register lol.
The leaderboard (and other places) shows names only in lowercase. I need capitalization on my name, it's part of the stonks-brand! :(
Maybe there is a bug: I tried to buy myself using my another account, which is unrated and certainly less than 6 rated contests, but I succeeded. I think this should be banned.
moyu_028 apparently also bought their own stocks for nothing (Holdings with $0 Purchase Price). I think that such inappropriately obtained stocks should be confiscated and returned back to market :-)
Edit: and now sold all 1000 stocks for $6.66 after buying for $0 (see moyu_028's trade history). That was free $6660 from nothing via exploiting this bug.
Adding margin trading would be much more fun xD
It seems that LGMs are being showed incorrectly (Fulislike)
You're right. I will fix the name colors
I think it would be safer if the website randomly generates a string for verifying instead of this fixed "StonksCF-verify".
Hello! I was out of cash and I wanted to buy a stock, so I sold some of my other stocks to get enough cash for it. The sell operation was successful, the stocks disappeared from my portfolio but I did not get any cash back. Any reason why this could be happening? Thanks for the help in advance!
Oh, this is very strange. I think it's because of a bug in my code that acts weird when there is a lot of concurrent transactions. I added some autofix code that should recalculate your cash and everything for the next trading cycle. Thanks for pointing that out
thanks a lot for the reply! :)
It seems that no one(including me) holds my stock but according to "Explore -> Available Stocks", my stock is purchasable only 995.
Some stocks disappeared happened to me, but maybe it also happened that I only get some cash and my stocks aren't erased.
That is so strange. I honestly don't really know how that happened. My only idea is that the MySQL database sometimes has conflicting records so it just misbehaves. In any case, I have fixed your available stock counts. For the future, I think I will have to just recalculate everything at the start of each trading cycle since thankfully they don't happen that often. But yeah sorry for the inconvenience
I think the stocks shouldn't exist until they have like 10 contests at least otherwise the best tactic is too just look for alt sounding grey names. Like "WaOnPretest2Forces", "TheOneYouLost", "SomeOneWillBeLgm" etc. You should give them the stocks when they reach 10 contests instead.
R...rating
P...price
Great chart!
Maybe two small mistakes:
The Pmin of Gray should be 0.00. And is the colour of specialist cyan?
There are some accounts which have a negative rating. Maybe in this case, unknown behavior.
Fixed, thanks!(By the way, I think #00ffff(cyan) is more lighter than CF cyan)
I found one with negative rating and its stock price is $0.00.
Free stocks anyway. :P
Updated! Added as a new row(White).
Some IGMs have incorrect price (maybe [2600,2700)'s Rank should be 8, but actually it works as 7)
Oh yeah, you're right. I accidentally wrote 2700 in my rank converter code. Thanks for pointing that out! It should be fixed during the next trading cycle
What an awesome project! It'd be epic if this gets incorporated into CF officially.
ORZ codetiger
codetiger927 can you enable transacting on all CF users and not just people who joined your site? I think it'd make it a lot more fun and interesting.
Hi. So I would like to, but the problem is, if people try to buy an unregistered users stock, and say they bought all 1000 of the stocks, then the system won't have any more stocks to give to that user once he registers. I think currently the best solution is, if you want to invest anyone who isn't registered yet, shoot them a DM and ask them to join :p
Couldn't you instead limit the default supply to 800 shares per user, and then create 200 new shares when they register?
Oh true. Hm, I guess I will think about it more
I think it would be fun to have a "leaderboard of millionaires" or so, to quickly find out who's the currently richest!
You can with our leaderboard at https://codetiger.me/project/StonksCF/leaderboard.html :D
we dont have a shorting option for more than the quantity we have. wouldnt it be good to have a shorting option so that we can short those who seemed to have climbed rather abruptly or are in a higher probability of not going up??
shorting rainboy in div 1 and educational rounds and then buying him before div 2 rounds should be awesome
orz
I think the change of nicknames has broken the website :( All my stock in senyaa has gone to 0 because they renamed to mtw
yeah something very weird is happening :weary:. I am trying to fix all of these issues. Sorry for the inconvenience.
:D hopefully the problem has been fixed! Let me know if there are any more issues
I know I'm dumb, but what should I do if I forgot my password ?
message me and I can reset it for you :D
The market is open now. But the stonks prices don't seem to have been updated after the Educational Codeforces Round 120 [Rated for Div. 2]. Which allowed to sell bad performing stonks for the old price.
i changed my handle to SirPh but its not updated in the website, it still shows the old handle which is error_404_2020
when i tried registering again using new name IT DID REGISTER and now i have 2 accounts with the same account
it has now been fixed. The new year name changed messed up a lot of things. Sorry for the inconvenience
Auto comment: topic has been updated by codetiger927 (previous revision, new revision, compare).