Notes on 1Market Demo
Reviewed: Oct 3, 2024
Last update: Oct 4, 2024
https://1market-demo.netlify.app
https://github.com/harmony-one/1market-demo
https://github.com/harmony-one/1market-demo/pull/1/files
Code
Dependency
- bignumber.js package (https://www.npmjs.com/package/bignumber.js/v/4.0.4) is outdated for 7 years and has little usage. Should replace it using native BigInt, or BN.js
- It is a potential security risk (for supply chain attack), though the code seems to be simple enough for review and does not currently contain malicious code
- web3connect is deprecated. Replace it with something newer (Web3Modal?), ideally requiring minimal change.
- Also a potential security risk
- antd has a very large package size. It is not great for demos since it might require 5-10 seconds to load at the first time in low-end network / machine conditions. Probably hard to replace for the demo, since it is used everywhere
UI
-
Clicking "Conenct Wallet" has no response using Safari or browsers without MetaMask installation
-
"Conenct Wallet" -> "WalletConnect" button has no response
-
Current market is closed. Need some way to demo or test both closed and open market
- could set up two pages for that, with links to each other, or a listing page).
- Leave at least one market always open
- such as, by setting a far enough expiration date?
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
-
In a closed market, "Redeem" button leads to a failed transaction
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
-
(โฆTo be continued after market is updated)
Oct 4, 2024
- Connected network is not checked. If the user selected Ethereum in their wallet, the demo is stuck at "Loading". Changing network afterwards does not fix the issue. A reload is required.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
- Loading takes about 4 seconds on a desktop computer with very good Internet
- Buying "Yes" or "No" with amount 1 results in BigNumber exception
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
- Selling with amount 1 results in the app asking for suspicious and potentially excessive permission. The collection which the link points to is "unnamed" and the contract is unverified. UI explaination and links are needed before asking for this level of permission
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
- Selling with amount 1 (or any amount) results in the same BigNumber exception
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More โ
Oct 7, 2024
- There is no status or progress indicator in the UI while a transaction is pending for confirmation. Since the entire process is longer than 10 seconds, this makes the user feel the demo is quite slow.
- Three transactions were required to buy "No". The UI needs to provide an explanation of what they are, and show how many transactions are remaining. Each transaction might take 5 seconds or longer until MetaMask provides a response
- The app requested spending on a custom-deployed WETH (https://explorer.harmony.one/address/0x67fe3aa18ae9f4aa388e76e14ada6b8a731a5140) with no good explanation. The contract's token information (name, symbol) should be updated to avoid confusion and clearly state it is for demo purposes only.
- Need a success indicator (e.g. notification) other than a simple numeric change on "my balance"
- The demo needs to show some aggregated data, such as
- total bet amount and number of bets on each outcome by all users
- activities over last 24h
- latest activity time
- Unclear what "Sell" part is doing, i.e. how much money is the user is expected to earn or loss, when something happens (at the expiration time). Some simple explanation would help
- "Buy" part is more intuitive, but some explanation is also needed