Problem
The markets a visitor sees are invented in JavaScript and have no relationship to the deployed
contract.
frontend/pages.js:1 -- pageMarkets is a literal array of six markets with hardcoded yes:
percentages (54, 68, 76, 47, 61, 43) and close labels like "Month end"
frontend/script.js:9 -- baseMarkets is another hardcoded array; exactly one entry carries
onchainId: 3, and only that one can be traded
The probability bars are therefore decoration. A market shown at "68% Yes" is 68% because someone
typed 68, not because of anything in the YES/NO pools. The catalogue does not change when markets
are created, resolved, or cancelled on chain.
The contract already exposes everything needed: get_market_count, get_market(market_id),
get_open_market_count, get_market_bettors_page.
Acceptance criteria
Why this is critical
The product presents itself as a live prediction market. Today it displays fiction with a real
Connect button next to it, which misleads anyone who funds a wallet and tries to trade.
Problem
The markets a visitor sees are invented in JavaScript and have no relationship to the deployed
contract.
frontend/pages.js:1--pageMarketsis a literal array of six markets with hardcodedyes:percentages (54, 68, 76, 47, 61, 43) and close labels like
"Month end"frontend/script.js:9--baseMarketsis another hardcoded array; exactly one entry carriesonchainId: 3, and only that one can be tradedThe probability bars are therefore decoration. A market shown at "68% Yes" is 68% because someone
typed 68, not because of anything in the YES/NO pools. The catalogue does not change when markets
are created, resolved, or cancelled on chain.
The contract already exposes everything needed:
get_market_count,get_market(market_id),get_open_market_count,get_market_bettors_page.Acceptance criteria
markets.htmland the landing page enumerate real markets viaget_market_count+get_market, with no hardcoded market array left in the codebasedocs/CONTRACT_CALLS.md)Why this is critical
The product presents itself as a live prediction market. Today it displays fiction with a real
Connect button next to it, which misleads anyone who funds a wallet and tries to trade.