Track

Climate Data & Environmental Monitoring. Cota is a climate data verification platform: it makes flood data, forecasts and warnings tamper-proof and publicly verifiable.

Inspiration

In May 2024, the Guaíba river in southern Brazil rose higher than ever recorded and Porto Alegre went underwater. More than 180 people died in Rio Grande do Sul. Afterwards, everyone asked the same questions: Who knows? Who warned us, and when?

Those questions turned out to be very hard to answer. Forecast websites overwrite old forecasts. Official warnings are taken offline when they expire. Spreadsheets can be edited later. Without a trustworthy record, everyone tells the story their own way. We wanted to build that record.

What it does

Cota is a river diary nobody can erase. Every day it records what was known about the river on the Solana blockchain (devnet), where anyone can read it and nobody can change it.

  • Three independent oracles. A blockchain can't see the weather, so oracles bring the data in. Each of Cota's three oracles fetches data on its own from public sources (INMET rain gauges, GloFAS river discharge and Open-Meteo weather forecasts) and signs what it saw. A value is only recorded if at least 2 of the 3 signed exactly the same thing. If one oracle fails, goes offline or is tampered with, the other two hold.
  • Live view. Observed river discharge against the model's forecast, with an uncertainty band, plus official INMET warnings. Even after INMET removes a warning, Cota keeps the copy and the time it was seen.
  • Early warning. The Guaíba fills up a few days after heavy rain upstream. If three weather models forecast a basin-average rainfall above 90 mm over the next five days, Cota raises an alert:

$$\bar{P}_{5\,\text{days}} > 90\ \text{mm}$$

The rule was written to the blockchain before it started running, so it can't be tuned afterwards to look right. Backtested from 2024 to today, it gave some false alarms, but it warned about all three floods in the period 4 to 7 days in advance.

  • 2024 replay. We ran Cota day by day over April 20 to May 25, 2024, as if it had existed back then. Each forecast was recorded before that day's real data. The first alert came two days before the river crossed the flood limit. A timeline shows which oracles signed, which were missing and which disagreed each day, and a source-quality grid records station failures instead of hiding them.
  • Verify button. Anyone can recompute a reading's fingerprint (hash) and check it against the blockchain. Tick "Simulate tampering" and the check fails instantly.
  • Vaults. Funds can be locked with a written condition, such as "if an early warning is issued for the Guaíba, pay this wallet". When the alert appears on-chain, the program releases the payment by itself. In the real world this could be an emergency fund that pays civil defense or families as soon as the risk appears. Here it uses test money only.

Cota does not replace civil defense, and it doesn't prove that a sensor measured correctly. It proves that nobody changed the data, and when the data existed.

How I built it

  • On-chain: a Solana program in Rust that checks the 2-of-3 oracle signatures and stores readings, forecasts, alerts and vault conditions, running on devnet.
  • Oracles: three separate processes that fetch, normalize and sign the data independently.
  • Data and forecasting: INMET hourly station data, GloFAS river discharge and Open-Meteo forecasts, with a forecasting model that outputs an uncertainty range.
  • Web app: a dashboard deployed on Vercel that reads the on-chain records and verifies hashes in the browser.

Challenges I ran into

  • Making three oracles produce byte-identical data, so their signatures could be compared, despite time zones (INMET is in UTC), missing values and floating-point differences.
  • Public data that fails exactly when it matters: during the 2024 flood, the official river gauge stopped transmitting at the peak. We chose to record failures as events instead of hiding them.
  • Being honest about uncertainty: the early-warning rule has false alarms, and we show them.
  • Building, testing and documenting everything solo in a short time.

What I learned

  • Blockchain is useful here for one specific reason: proving that a record existed at a given time and was never changed. It doesn't make bad data good.
  • Oracle design is a security problem first. Independent sources and a 2-of-3 threshold matter more than any single clever feature.
  • In flood forecasting, lead time and honesty about uncertainty matter as much as accuracy.

What's next

  • Oracles run by independent institutions (civil defense, universities, NGOs) instead of a single author.
  • Hourly river level data from Brazil's National Water Agency (ANA).
  • Piloting with a river basin committee, and adapting it to other rivers, including Pacific island nations with sparse monitoring.

Built With

Share this project:

Updates

Submission history