MandiPraman

Empowering Indian Farmers

Repo
MandiPraman banner

About

## The problem it solves

A farmer deciding where to sell a load of onions today usually hears "today's price" from the buyer or a commission agent, who may gain from quoting low. Official price sources exist, but they are slow and hard to use on a phone, in a regional language, at the moment of decision. And any price list kept in one party's database can be edited or deleted without anyone noticing.

Mandi Praman (प्रमाण = proof) is a crowd-sourced crop price board for Indian mandis:

  • Anyone can post a price for a crop at a mandi. No account and no crypto wallet.
  • Others confirm or dispute it. A report is left out only when it is clearly rejected (at least two disputes, and more disputes than confirmations).
  • The board shows the median of recent trusted reports, so one wrong number cannot move it, and highlights the best mandi and how much more it pays than the lowest.
  • Old prices vanish on their own (reports expire after 7 days in this deployment), so the board shows what is current.
  • Interface is in English, Hindi and Marathi.
  • Every post and vote links to the transaction on the Arkiv explorer.

A farmer gets a second opinion on a quote, in their language, from a record nobody can quietly rewrite. Prices in the demo are synthetic test data, and the app says so.

## Challenges I ran into

1. The board hung on "Loading prices…" for minutes. Each page refresh sent the same list query to the rate-limited public RPC four times (`/reports` and `/prices` each queried reports and votes), with no timeout and no sharing of in-flight calls, so slow calls piled up. Fix: one shared cached listing for both endpoints, identical in-flight reads share a single request, a slightly stale value is served while a fresh one loads, the last good value is kept if a refresh fails, and the RPC transport has a 15 s timeout with 2 retries.

  • Anyone could fake a "price report". My first queries filtered only on my own `project` tag, but anyone can copy that tag onto their own entity. Fix: every query now also uses `.createdBy(relayer)` and voting checks the report's `$creator`. The creator field cannot be forged.
  • Entities were not actually frozen. I assumed posted prices could not be edited, but as owner the relayer could have patched them. Fix: create every report and vote with `flags: { readonly: true }`, and I wrote `npm run prove-readonly` to show the owner's edit being rejected. A delete is still possible, so the README says so honestly.
  • A confirmed transaction looked "not found". Right after a vote, the explorer said the transaction was not found in storage; a few minutes later it showed Success. It was explorer indexing lag, not a failed write.
  • Silent zero rows. A query with the wrong attribute type (`u64` against a stored `i32`) returns nothing and no error, which looks like "no data". I used `npm run probe` to map this out and stored prices as `dec` and times as `u64` consistently.

I also learned the public RPC is heavily rate limited, and the explorer and docs examples did not always match the SDK. See `arkiv/friction.md`.

Team

From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

mandi-connect

Direct Farm-to-Retail Marketplace — Farmer sets th