Will I release a substantive web3 (crypto) game in 30 days?
24
62
resolved Mar 10
Resolved
YES
I am learning web3 and smart contracts. The goal is to release a game based on this. I haven’t chosen the game but the level of complexity might be: * Texas holdem, adapted for zero trust and decentralized play * Dynamic Paramutual! Inspired by this site. * Chess (there is some prior art i can use for this) * Something of similar weight. The game will be testnet only so people can easily get free money to play with but like manifold it wont be easy to get unlimited amounts so it will feel worth something. No requirement to get players for this bet. Just the game on a public website. Feb 26, 10:53pm: I have I think finished the contract! It allows you to register (and get free play money as a result), create a market, bet and resolve a market. It enforces a close time too. I am now taking a few days break from this, and will come back and start implementing a UI using NextJS. I will probably get all the mechanics in first, then put in the IPFS related stuff last. Close date updated to 2022-03-10 10:48 am Closing because I want to take what I have and run it by Discord for some judgement
Get Ṁ200 play money

🏅 Top traders

#NameTotal profit
1Ṁ243
2Ṁ61
3Ṁ53
4Ṁ42
5Ṁ41
Sort by:
sold Ṁ1 of YES
Because of smart contract mistakes I have 2 brilliant features that MM doesn't have: A minimum bet size of 2 You can see when a market is resolved, but you can never know (and the data isn't really even on the blockchain) whether it resolved YES or NO!
bought Ṁ1 of YES
Ah just realised I can figure out if a market is resolved by looking at the MarketResolved event, so I will do it that way for now. A bit sucky but would like a good UX without killing off the existing markets.
sold Ṁ1 of YES
Good news = you can resolve the market now! Bad news = I forgot to add a parameter in the contract when you get market info to tell you whether it is resolved, so the resolved market will appear unresolved in the UI for now. I won't update the contract, lest I lose the existing data (this non upgrade problem can be solved but I'll do that in V2!). If you want to tell if a market is resolved, try to make a bet and MetaMask will warn you the transaction will fail with "This transaction is expected to fail. Trying to execute it is expected to be expensive but fail, and is not recommended.".
bought Ṁ1 of YES
@Matthew, I think this is your question https://web3-six-flame.vercel.app/predictionmarkets/markets/0x990E1DDe8d35D6d693ee3d7230A149aA1dE63386/0 (to avoid permadox, his link is on an alias domain so you may need to reallow metamask). Can you take a look and see if you like it. I have not got resolution there yet, but it should be easy enough to do before the market deadline. I have got a list of bets with fields you'd expect, and you can now bet YES or NO!. You can't sell like MM, I don't think this will be in the first version of the game. Unfortunately I forgot to add a comment IPFS field for bets so it's silent betting for now.
sold Ṁ1 of YES
On the live site you can now view markets, view the bets and make a bet. There are some bugs with making a bet to iron out, so treat as alpha software.
bought Ṁ1 of YES
Update, well working on it. I am behind on Make Bet, as it is a bit more complicated due to getting to that point where you need to refactor a bit to make sense of things. I still think I have a good chance and the market is cheap. I won't buy myself anymore as I don't want to be too influenced and use "insider trading" information.
bought Ṁ1 of YES
Fixed the number validation issue and made that ui a bit nicer for unregistered users. Busy day with other things but hopefully get time to create the market info page from which you can bet.
bought Ṁ1 of YES
Thanks Matt it is so awesome to see the new markets appear! The smart contract is well tested so you will get rejected for overspend but yes the UI has some issues and I am releasing super alpha work here, thanks for trying it.
sold Ṁ1 of YES
Let me know where best to put bug reports, currently seems like any value that isn't a power of 10 greater than 1, or is outside of your available funds amount, doesn't work as a market ante. I think you just want the latter criteria, not the former :)
bought Ṁ1 of YES
Looks better! Made a question, look forward to checking in from time to time!
sold Ṁ1 of YES
Ooh not good! Do you get that after clicking Confirm on the popup, or did it not get that far? Can you confirm you are on Rinkby test network? Although if you are not in theory my site should warn you!
bought Ṁ1 of YES
Tried refreshing after connecting MetaMask, now I'm getting a timeout=5s response. Do I need to have a bio?
bought Ṁ1 of YES
Thanks I will fix those up thanks! Hopefully you can get it to work using metamask. You may need to log into metamask before refreshing the page.
bought Ṁ10 of YES
Hey, looks interesting! I wasn't able to register, though, I'm getting a "Error occured during registraion Details from provider: request failed or timed out" response. Which should be *occurred and *registration :)
sold Ṁ1 of YES
There is no back end! This is a static site, with information stored on the blockchain and IPFS
bought Ṁ1 of YES
If you want to see my progress hit up the link from my profile page https://manifold.markets/Martin Connect using Metamask and the Rinkby test network. Register to get a free 1000 play money, and then you can create a market and look at it in the list (and that is pretty much it!)
bought Ṁ10 of YES
Rough plan for finishing this off: TODAY: Create market (DONE) 4/03: View markets 5/03: Make bet 6/03: Resolve market 7/03: Any missing UI/Validation type stuff 8/03: User page - user profile + their markets + Get BETA tester 9/03: Add avatar support 10/03: Update avatar/bio UI
bought Ṁ200 of YES
motivation juice
bought Ṁ10 of NO
fuck the web3 grift
sold Ṁ0 of YES
Lel! Share my code and a big NO trade comes on. I spotted the bug anyway I am working on it!
bought Ṁ1 of YES
The contract is almost done. You can create, bet and resolve a market. What you can't do is set up a closing time yet. That will come soon and be quite easy. And there is more unit testing I want to do too. See (github account in my profile) /web3/blob/predictionmarket/contracts/solidity/PredictionMarket.sol
bought Ṁ1 of YES
I have now written the smart contract code to calculate the number of shares you get when you bet and done some very basic tests (the amount of shares decreases per stake if you repeat bet the same stake).
bought Ṁ1 of YES
Pretty sure I am going to go with DPM for this after all. There is a gas efficient algorithm for doing logs already written than I can just install and use - https://github.com/paulrberg/prb-math, which solves the maths challenge, and probably this week I will aim to finish of the contract + test. Next week is busy so might not get much done, but then I need to make a UI. This should be mostly plumbing work, but the bit that will be new to me is IPFS integration.
bought Ṁ1 of YES
Today I am considering which pool algorithm to use. For me the decision is much simpler than for MM. MM are looking deeply into this, surveying the users etc. talking about it on discord etc. They are thinking long term. For me, for this challenge I need it to (a) work and (b) be quick. Ideally (c) be gas efficient* I have 3 choices in mind. 1. The first DPM algorithm in the 2004 paper that returns bets to all winners, and then divvys out the rest according to shares. I would prefer this, if I can get log/exp to work. There is some advice on this here https://medium.com/coinmonks/math-in-solidity-part-5-exponent-and-logarithm-9aef8515136e 2. If not then I will learn how uniswap works. After all that is used with real money and is battle tested. 3. If not then I will go lame and do a normal PM pool. $1 = 1 share... always. * This dapp will only work on rinkby test network where gas is free, but still it is a principle that it should be actually usable on say a cheaper EVM compatible network. Or maybe on those various Ethereum rollups.
sold Ṁ1 of YES
Started on this bad boy: ``` function createMarket(bytes32 infoMultihash, uint pool, uint8 prob) public { User storage user = users[msg.sender]; require(user.username != 0); require(pool >= minBalanceForPool); require(prob >= 1 && prob <= 99); require(user.balance >= pool); // Set up Market // ============= Market memory market; // Transaction >>> user.balance -= pool; market.pool += pool; // <<< Transaction market.prob = prob; market.infoMultihash = infoMultihash; user.markets[user.numberOfMarkets] = market; user.numberOfMarkets ++; emit MarketCreated(msg.sender, user.numberOfMarkets - 1); } ```