sunflower-land's Issues
Contributing guidelines are Missing
Issue:
- The Contributing guidelines are not specified in this repo (at least on main branch)
CONTRIBUTING.md
file is missing
I'm not sure if this repo is open for outside contributions
Possible solution: π
- I believe that adding
CONTRIBUTING.md
file with appropriate guidelines would make it easy for open source dev's to contribute.
Create dynamic message for supply halving
Presently, the UI shows a static message for 1.000.000 token halving event. We've already surpassed that; should be pegged to the maths in the white paper, instead.
Example in UI:
Planting Helper Widget
Improve the clarity when planting something.
From 2i1v
in discord:
"
Hey, just a graphic representation of the idea from a few days ago (obviously I suck at PS, sorry). When holding the "seed" and hovering over an empty spot, instead of just showing a miniature of the plant, it could show the sprout and besides it the actual plant and the time needed for it to grow, or it could show the $SFF reward, just a thought. It may throw some more clarity when deciding what to plant or just to avoid double-checking what plant you are holding , without opening the whole list of plants.
"
Switching between farms
Managing multiple farms is becoming a bit of a process since users need to refresh the page.
A bug can also arise where your selected fruit is persisted from the previous section. This can cause issues if you switch to a farm that has not yet unlocked that fruit.
When you go to save the game it would throw an error.
Expected behaviour
- Changing Metamask accounts pops up a loading screen that refreshes the farm in the background
- The selected fruit is persisted against the last account type
Cave / Mining
This is a request for a cave/mining artwork that will be used in the quarry section of the game.
In the future, the idea is that this will be a portal to more advanced mining mechanics.
Use $SFF when token referencing the token
There are a few places in the documentation and the gameplay where it is not clear that the $
is referring to SFF.
Includes
- Find all the locations where we are referencing the Sunflower Farmer Token and include the symbol and the logo if possible.
ProjectJourneyMan - Discord
Please update the site to correctly use the $ symbol.
10 SFF -> ten Sunflower tokens
10 $SFF -> ten Sunflower tokens
$10 -> ten USD
$10 SFF -> ten USD worth of SFF
Duplicate passive miner animation for remainder of NPCs
The miner NPCs have a passive animation when standing still that gives them a bit of life. The remaining NPCs are pretty synthetic feeling in contrast. The proposed solution is to duplicate the animation of the standing miner NPCs onto the others (see below for areas of reference).
Example of static NPCs:
Error when saving with Brave Wallet
When calling the contract with Brave Browser's new built-in wallet, the transaction succeeds but I'm shown an error.
Here's the error UI that is presented after signing a save transaction with my hardware wallet:
Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.
{ error: { code: "-32000", message: "notifications not supported" }, id: "51", jsonrpc: "2.0" }
[BUG] burnCosts is vulnerable to Integer Overflows
Hi,
I just did a Write Up of what probably led to the Iron PickAxe Exploit.
https://www.reddit.com/r/0xPolygon/comments/rz29cx/the_sunflower_farm_hack_explained/
Please keep that in mind when you are redesigning the game :)
An update to solidity >= 0.8.0 should already prevent this.
Description Meta Tag is Missing
Issue:
- Description Meta Tag (
<meta name="description" content="">
) is missing frompublic/index.html
file
Possible Solution: π
- Add description meta tag with an appropriate description to content attribute
e.g.
<meta name="description" content="Play to Earn Crypto Farming Game.">
PS: I would be happy to work on it :)
Dynamic Pricing
Once the total supply reaches 100,000 the price will dilute by ten fold. The current game mechanics do not factor in this dynamic pricing which means the UI will be out of sync with the actual buy/sell prices offered by the smart contract.
Requirements
Based on the total supply, set the correct prices for the following actions:
- Fruit Board (Buy/Sell prices)
- Upgrade prices
[BUG] NPCs resized when mining Gold only
reported by RovingRover on discord
https://discord.com/channels/880987707214544966/881648372249939980/926684256716087386
Steps:
- Mine Gold -- some NPCs resized after clicking Mine and MM prompt
Does not happen when clicking other resources, only gold
Egg Modal displays "2 days" after collecting eggs
For tracking. Also observed by other discord members https://discord.com/channels/880987707214544966/913926853335605329/926192222653775882
https://discord.com/channels/880987707214544966/881648372249939980/926390388044988488
Sample video
Possible Causes:
After collecting
hatchTime
= 1640935565.175
timeLeft
= 86400.17499995232
- when
timeLeft
has decimals and is passed tosecondsToString()
,Math.ceil()
will increment the value by 1 therefore displaying wrong amount of time. Please see attached screenshot
Workaround:
- Refresh browser
Proposed Fixes, either:
- [Chickens.tsx] include
hatchTime
inside Math.floor() when gettingdifference
- [Blockchain.ts] floor
this.eggCollectionTime
incollectEggs()
[Blockchain.ts] callthis.loadEggCollectionTime()
and assign return value tothis.eggCollectionTime
Calculating LP SFF Equivalent Positions at Snapshot
I mentioned to Bumpkin Builder in Discord that I would like to volunteer to write a module to address this.
Issue:
Unlike SFF tokens which are easy to identify in snapshot, identifying the SFF token equivalent of LP holders is not. When an individual enters an LP position, they receive a "Uniswap V2" token(s) associated with the smart contract with their percentage share of the liquidity pool. Liquidity Providers are an important part of the Sunflower Land ecosystem and a fair, objective and auditable way of calculating their SFF tokens should be created.
Resolution:
In order to calculate the number of SFF tokens associated with a wallet, the total number of SFF associated with each LP at block #23451693 will be recorded. Preliminarily, it appears active liquidity pools at 23451693 existed at Quickswap and Sushiswap. Using Polygonscan API (Pro), the total number of "Uniswap V2" tokens for each LP will be recorded. Then a list of all wallets holding aforementioned tokens at 23451693 can be generated to determine proportionate share. Finally, when SFFv2 is released, wallets can receive SFFv2 based on proof of each "Uniswap V2" tokens they held at snapshot or they could simply be airdropped, whichever the core devs and/or community believe is better.
All of the code used to generate this will be submitted here so anyone and everyone can review it, however, I can't release my Polygonscan API key to more than a few people for independent auditing.
I strongly encourage any feedback while I create this module and look forward to expanding Sunflower Land's repo. I'm AncientHorse on Discord if anyone wants to DM me.
Expensive Gas Price
From 2i1v
on discord:
Noticed that in order to upgrade the farm you need the required balance in SFF saved beforehand (or hold it in the wallet), but if it's only live-session SFF balance (or unsaved) it will throw random, and expensive gas prices since you don't have the required SFF balance in the wallet. Is this working as intended? Maybe add another quote in-game stating that you need the SFF updated in the wallet in order to upgrade, otherwise it won't work.
What kind of project allows fudders in the name of free speech!?
I really got frustrated by negative speach about this project in discord, fudders are banned in successful communities, why are we allowing it ?! And the mod intervals.eth are muting me for addressing this critical issue, we are not a country to have free speech we are a closed community and we have made alot of enemies, competition, I feel like we're infiltrated by other game investors gaining a lot of momentum does this effect, we need a solution fast or negativety will brevail and say goodbye to the community,
Error: Replacement transaction underpriced
Warn farmer about incorrect network
When a user is on a network other than Polygon we still allow a transaction to occur which will ultimately fail. We should give feedback to the user to change to the correct network.
test help localhost
hello I would like to try some nft articles that I am creating and I would like to test it on localhost with ganache but I cannot compile the code truffle gives me errors when compiling, does anyone know how to do it?
various version errors in truffle solidity and yarn or npm install ...
Proposal on game's tokenomics.
Another proposal but it is purely handled by tokenomics. It will not stop the bots but it may give some breather to polygon congestion.
- Introduce two token system into the game. Like one representing farmers yield in the game $SFFYield and other one having monetary token value like $SFF.
- In the game you earn in yield token $SFFYield by farming but you need to swap it to SFF token for monetary value.
- You can make $SFFYield token to be swappable via only a fixed smart contract of a game for $SFF tokens. this will avoid issues faced by players during halving and DEVs can implement halving tokenomics on it too.
- Make the swap contract which will handle swapping of yield token to SFF token, allow swapping greater than the certain value. This will also increasing holding of token by users and reduce too many smaller swap transactions.
- Don't force time based game save. Let users bear the gas cost of data commit transactions they are willing to do on polygon. Just show a estimated gas monetary cost counter in the game UI which will let user know about the estimated cost to save their game after all their changes.
Insufficient Funds chip in wrong spot
From 2i1v
in discord.
Since I'm making a walltext I'll also add this little detail; the 'insufficient funds' and 'upgrade required' alerts are in the wrong line or 'box'. I already am able to buy Cauliflower, and I do have the SFF to buy Beetroot, took the screenshot so it's easier to explain. Hope it helps.
[Request] Fix Saving Progress
Please keep this off-chain for some time and then synchronize gradually, who thought saving directly to the blockchain every 25 minutes was a smart idea? (It obvious 99% of the players are bots farming stuff) The whole network is down trying to process all this transactions, it seems you didn't even bother to use the testnet first to stress-test this "feature".
You can cache or store all the changes in IPFS if you want a decentralized system so badly, and then go gradually sending those transactions to the blockchain with an automated tool (query from ipfs -> push transactions to smart contract). You'll of course have to decide what must be instantly recorded in the blockchain in case there's something so important. The user can pay the estimated gas fees in advance to the contract or to another contract that will then make all the transactions happen. If you want the game to have success instead of massive hate this should be addressed ASAP.
Fruit counter on favicon
Hello, I was thinking that would be useful to add a badge on favicon with fruit counter.
I can develop it, I would add a State for Counter to App.tsx and use Context to add / remove items in Field.tsx
When timeleft goes to 0 the counter the counter will be increased, when fruit is harvested it will be decreased.
Thanks :)
Support for multiple languages
Hi Guys! π
I would like to change the game language, I looked at the source code and I didn't find support for translations, do you plan to implement this? I can translate to pt-br, I see many Brazilian players entering the game and the translation would facilitate the gameplay.
Update discord invate URL
During Maintenance Bot detection Mechanism | Discussion
There have been mentions about a blacklist functionality blacklisting the bot addresses from using the game. I have a couple of points which I would like to open for discussion.
- Are we going to blacklist them from completely playing the game ever again? or are we simply going to reset their gameplay and set everything back to zero?
- What is the mechanism for detecting which address is a bot or not. Are we going to have a hard limit on the block ID (as in anyone after a certain block ID, say after 5 hours from the maintenance) is a bot? or are we going to have some certain condition such as anyone who has interacted with the contract more than 10 times is a bot or anyone who has grown their SFF or any other token balance by more than 25% is a bot?
- For if any address becomes a false positive. What are the ways with which they can be un-blacklisted and their account restored. Maybe like a form or something which can be reviewed later by someone or a group of someones who has the authority to unblock. (That's not decentralization, I know, but implementing a voting system for this will be a bit overkill).
These are just proposals, I can help with writing the code as well, but wanted to get the discussion going for the specification.
Disable Save Button After 30 Minutes
A farm must be saved within 30 minutes otherwise it cannot pass the smart contract validation.
Currently when the timer reaches 0 it goes negative but the user can still click save which causes an error in the transaction.
Requirements
- When the timer reaches 0 disabled the button
- Show a helpful message to the user.
You can find the code in Timer.tsx
"Transaction expected to fail" error in Metamask due to Frontend not updating after successful transaction and users retrying the action
Raising an issue here for tracking. Will observe concerns from discord and will update if there are other causes.
Sample videos:
Steps done:
- Chop wood
- Submit transaction - Successful transaction BUT app didnt update visuals
Click anywhereWait for ~20 secs and chopping animation disappeared- Retry chop wood - Transaction is expected to fail error
Root Cause: TBD or intermittent
Possible causes:
- state not transitioning
- isolated on refactored
stake()
code
Notes:
- app is active tab/window
- might not be the sole reason for tx expected to fail error msg
- also happened when mining gold (different session, refreshed and all)
RPC ERROR!
Im having for more the 20 hours with the same problem RPC Error 32603, can someone help?
Possible to become a farmer?
Hello good humans! Possible I can be a farmer in this new farm-land? Always wanted to see myself in 3D picking carrots. We can make a 3D character on my side as we already have character designs & 3D modellers. π‘
Local Dev help
when i try truffle compile, there aways ends up with error " Truffle is currently using solc >=0.6.0 <0.8.0, but one or more of your contracts specify "pragma solidity ^0.8.0" ";
branch: main
Truffle v5.4.27 (core: 5.4.27)
Solidity - >=0.6.0 <0.8.0 (solc-js)
Node v12.18.1
Web3.js v1.5.3
when i try branch 2-dynamic-pricing, it success.
Mobile Screen Support
For supported mobile MetaMask applications, the game is not adaptive to the mobile screen size.
Current Behaviour
- Players can only see a portion of the farm
- Players cannot pan around the farm
- Zooming out causes a strange pattern to appear
Expected Behaviour
- Players can scroll around the farm and interact
Transaction Error. Exception thrown in contract code.
Proposal of possible solution to fix bot issue with the game
I had lengthy discussion in our discord #community-dev channel but I will summarize the proposal here for consideration for DEVs:
- Make new forks of games smart contracts.
- Introduce Shape drag fill based captcha to game's UI during save click. Player will have perform this captcha check.
- Introduce a middle layer backend proxy JSON RPC API with similar API calls like polygon's PRC API, which will be used by Game's frontend web UI to handle save button captcha function of the game and then call game smart contract with following workflow:
a. When Player will hit save and perform shape fill captcha successfully, metamask should pop up, asking user to sign and send the transaction. this payload will be generated and signed with additional data payload (reference:
{
"user_wallet_address": "0xwalletaddresshere",
"is_captcha_verified_correct": "YES"
}, this_playload_signature_signed_by_verifying_player: "xxxxSignatureValueherexxxxx"
b. Then this middle proxy API, add additional data parameter signing this whole payload with its owns private key whos public key is known to smart contract and validate that indeed this came from game's authorized backend proxy API.
{
another_signature_signed_by_games_centrailzed_backend_server_just_prove_that_it_indeed_came_from_game_backend_server_not_directly_from_any_bot_since_key_is_secured_with_game_centrailzed_backend: "xxxxSignatureValueherexxxxx"
}
c. and calls the smart contract, now the contract has all the data to make validate the transaction that it came from a player verified with captcha, signed by backend API and has player's wallet address to deposit his farm yield earnings and rewards.
- Team can deploy this solution on any public cloud serveless platform aws lambda/azure functions to be very cost efficiently and upscale/downscale based on traffic load.
P.S I am not a web3.0 DEV and coming from web2.0 space so not sure about feasibility of this solution
Ability to give bigger donation
The smart contract requires a minimum of $0.1 MATIC to start a farm.
Currently the game sets the donation to play at $0.1 MATIC and does not allow users to give a larger donation if they want to.
Requirements
- Allow users to select the amount they want to donate ($0.1 - $10)
- Default the initial amount to $0.25
There are no specific UI requirements around this. It could be a slider, a number input or whatever feels right.
Game progress only saves in browser.
Has this been forked to bnb?
Same problem with ETH and the damn kitties back in the day....
Forked yet?
Off chain game platform
What would it takes to make it , a platform to save progress on the website with a wallet for every profile and to convert to $SFF you must accumulate a fixed ammount like 100 or whatever, this ammount can be changed in the future , but the idea is to make a platform like gala games or any others, is it hard to make or impossible or unimaginably costly!? This way you could also make your own token router and control exchange rate and transaction rate taking out Blockchain load!
Proposal - Multilanguage
For V2 i propose to create different "teams" dedicated to languages.
There is no multi-lang system yet
Have a nice day
Gas price is hardcoded
Please get current gas price from an oracle and set it accordingly.
Harcoding the gas to 500 Gwei, since the game is so popullar, only rises the minimum gas to 500 Gwei without any benefit to the players.
A free endpoint to get gas prices is: https://gpoly.blockscan.com/gasapi.ashx?apikey=key&method=gasoracle
Exploit to select unavailable plants
Reported as private message through discord to prevent abuse
I will fill details here after it's fixed and deployed
I found an exploit in the game, that allows me to pick any plant I want, even if I don't have it unlocked. This PoC shows that I was able to plant a parsnip even if i don't have it (the parsnip is at the bottom left farm, the top plant):
The trick is: set the local storage item named fruit to the desired number (parsnip is 6), then refresh the page (for obvious reasons, this is better done after saving the game):
Here's the culprit: https://github.com/adamhannigan/sunflower-farmers/blob/3f69742271eb57d55c30f1ef94a67e5e9191b46e/src/dapp/components/farm/Farm.tsx#L30
The fix would be to check if the user is allowed to select that plant when loading the value from local storage, and if not then default to the sunflower or similar.
Note: After trying to save the game and investigating a little further, it seems the contract detects this and fails throwing an exception during the save process, making this potential vulnerability unexploitable.
Grace Period and your Twitter Post
Is the grace period based on the block immediately before your Twitter post at https://twitter.com/0xSunflowerLand/status/1480511921480732672
The SFF community would probably like to know the applicable block during the pause for building out V2 of the game, thanks.
[BUG]: NO Anti-Cheat function | BOT Detection β
Issue:
-
πβ This game doesn't seems to have any, either
Anti-Cheat
orBOT detection
functionality β
It is obvious that lots of players are using multiple bots to to do their work in turn congesting the Polygon Blockchain.
This game should implement features to avoid BOTS and any UNFAIR tactics that could cause congestion of the Polygon Blockchain as well as UNFAIR to REAL Players.
Feel free to discuss and find various possible solutions π
Possible Solution: π
- Add CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) to Save Button, such that before players can save their state of the game they need to PASS the CAPTCHA test
- Services like reCAPTCHA, hCaptcha, etc. could be used.
- Though, GEETEST seems promising πͺ
(Binance uses GEETEST for BOT detection).
P.S I'm not a web3 dev, please ignore this solution :)
BOTS available online:
Not pastings the links here as it MIGHT encourage people to use them
- Dev's pls contact me, so that I can provide you with the links for case study.
DISCLAIMER:
I DO NOT SUPPORT OR ENCOURAGE THE USE OF BOTS OR ANY KIND OF CHEAT OR TACTICS THAT COULD BE CONSIDERED AS UNFAIR MEANS.
Gas pricing strategy is overloading the polygon network
Hello,
with the success of sunflower, the polygon network is now at a minimum of 500gwei.
This is thanks to a limit in the estimate provided by w3 within "public async estimate(incr = 1)"
I believe setting a max value in the code to something like 100gwei in addition to the existing min value would allow to keep the gas low enough for the same amount of transaction to work while keeping the gameplay right (except for a few minutes after the change)
i'll try to submit a code change proposal
404 RPC Error
Allow users to save after 25 minutes
As a farmer, I should be able to save after 25 minutes.
Currently, users are getting frustrated when the timer expires and their hard earned rewards are lost.
Requirements
- Adjust the transactions with an offset since the timer expired. This will make the timestamps valid
Info modal not showing to correct upcoming price
Missing LICENSE
Issue:
- NO License is Specified π
- Missing License file (
LICENSE
)stating appropriate License name and copyright authors
I was exploring the repo (obviously because of recent hype of Sunflower Farmersπ) and found out that the repo (at least main branch) has not specified any License (or License file).
Possible Solution: π
I believe that, adding an appropriate License would make sure that the code is used and implemented correctly. Apparently avoiding any improper/(unauthorized) uses.
Scarecrow
A scarecrow will be an NFT that is used to improve the rate at which wheat is collected.
We are looking for an improved version of the scarecrow than the one that is in the game.
Sunflower Tombstone
A Sunflower Tombstone will be a special edition decorative NFT that players can craft.
It symbolises the death of Sunflower Farmers π’
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.