We are seeking a skilled Postgres/Supabase engineer for a trial project to develop a critical database function. If this initial project is successful, there is potential for a longer-term engagement. The primary goal is to create a robust Postgres function that automatically grades World Cup match-card picks against game results and updates user wallet balances.Concrete Deliverables:A settle_wc_match_card(cycle_label TEXT) function with the following capabilities:1. Joins picks (where card_type = 'wc_match_card' and league = cycle_label) against our results table on game_id.2. Sets
picks.result to 'win' or 'loss' based on side vs winner for result picks, and home_score + away_score vs line for total picks.3. Updates user_scores.ech_balance by the winning potential_ech amounts for each user.4. Is idempotent, meaning running it multiple times will produce the same final state without unintended side effects.Additionally, a short README in plain text explaining how to call the function, its assumptions, and any handled edge cases is required. The function must be tested against our existing Cycle 1 data, which includes 8 matches and real picks already in the
database.What We Will Provide: Read access to the schema for picks, results, sports_feed, user_scores, and signups tables. A sample of how our existing daily_seven settlement works to ensure consistent patterns. Direct access to the founder for clarifying questions throughout the
project.This is a small, focused project with an estimated timeframe of 8-12 hours of dedicated work over approximately 3 days. We are compensating for the successful delivery of the function, not based on hours
logged.We are specifically looking for candidates who can provide a link to their GitHub profile with at least 3 merged pull requests for review. Please include a brief paragraph detailing your experience with Postgres functions or Supabase. We also require your time zone and typical working hours, and encourage you to ask any questions you may have about the project, as thoughtful questions will positively impact your
application.We are not considering generic pitches or candidates unable to share a GitHub profile. We also require candidates to be within US Eastern time zone +/- 2
hours.Upon successful completion of this trial, the next project involves automating our score-pulling pipeline from The Odds API, with a clear roadmap of future work for the right individual.
Delivery term: Not specified