Will I release a substantive web3 (crypto) game in 30 days?
24
62
Ṁ3.4Kresolved Mar 10
Resolved
YES1D
1W
1M
ALL
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
Related questions
🏅 Top traders
# | Name | Total profit |
---|---|---|
1 | Ṁ243 | |
2 | Ṁ61 | |
3 | Ṁ53 | |
4 | Ṁ42 | |
5 | Ṁ41 |
Sort by:
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.".
@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.
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.
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!)
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
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.
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.
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);
}
```
Related questions
Related questions
Will I begin using cryptocurrency transactions in my daily life before 2030?
49% chance
Will cryptocurrency and web3 be mainstream by 2032?
25% chance
Will I have developed a decent incremental game before the end of 2025?
37% chance
Will Meta (Facebook) deliver on it's web3/metaverse vision before 2030?
35% chance
Will I release another game on Steam before the end of 2029?
70% chance
Do you believe decentralized finance (DeFi) will play a major role in the crypto landscape in 2030?
58% chance
Will I release a game in 2024?
77% chance
Will I ever make a real world purchase with a crypto currency?
69% chance
Will I subvert my internet blocks on a day that is not covered by one of my rolling commitment markets by June 30?
35% chance
Will I still be playing with my experimental software idea in mid-June?
55% chance