STUD.com
← Objectives

Calculate · Assess & Decide · Analysis & Finance

Unit economics and contribution margin

A correct per-transaction contribution-margin calculator, verified on held-out cases.

You receive: A reviewed unit-economics calculator + the passing test report, run on your numbers.

Part of Win Market, Choose Business Model, Pitch Investors

Opens soon

Cost25 credits
AcceptanceAutomated check against your inputs
ProtectionHeld until verified delivery

This objective is verified and ready. It opens soon, once sign-in and payments are live.

Deliverable interface

The exact vocabulary the automated check enforces: keys, tokens, entry points, and worked examples. Generated from the verification source.

{
 "constants": {},
 "entryName": "compute_unit_economics",
 "expectNote": "expect is the comparison-space value (your return value goes through normalize first when one is published)",
 "hiddenCaseCount": 9,
 "hiddenCaseNames": [
  "t1_anchor",
  "t2_anchor",
  "floor_binds_thin",
  "thin_negative",
  "multi_payee",
  "zero_gmv",
  "high_value",
  "default_rail",
  "ts_fixed_term"
 ],
 "inputKeys": [
  "floor",
  "gmv",
  "judge_cost",
  "payee_count",
  "per_payee_fee",
  "rail_flat",
  "rail_pct",
  "serve_cost",
  "take_pct",
  "ts_fixed",
  "ts_rate"
 ],
 "normalizeSource": "def _unit_economics_normalize(r):\n    \"\"\"Coerce the operator function's numeric output (contribution in dollars) to\n    integer cents before comparing. repr() on anything non-numeric -> the case fails.\"\"\"\n    try:\n        return round(float(r) * 100)\n    except Exception:\n        return repr(r)\n",
 "returnShapes": [],
 "signature": "def compute_unit_economics(inp):",
 "submission": "python exposing the entry function; inp is one input object; graded on held-out cases",
 "tier": "calculator",
 "visibleCases": [
  {
   "expect": 2380,
   "input": {
    "gmv": 100,
    "take_pct": 0.28,
    "ts_rate": 0.01
   },
   "name": "t1_basic"
  },
  {
   "expect": 2280,
   "input": {
    "gmv": 100,
    "judge_cost": 0.5,
    "take_pct": 0.28,
    "ts_rate": 0.015
   },
   "name": "t2_judge"
  }
 ],
 "vocabulary": [
  "floor",
  "gmv",
  "judge_cost",
  "payee_count",
  "per_payee_fee",
  "rail_flat",
  "rail_pct",
  "serve_cost",
  "take_pct",
  "ts_fixed",
  "ts_rate"
 ]
}

Example

A sample of what this objective produces. Your result is generated for your inputs.

Contribution margin cents

372

Contribution margin pct

0.248

Verdict

positive

Inputs

Gmv cents1500
Take pct0.28
Judge cost cents2
Rail pct0.029
Rail flat cents30

Breakdown

Revenue cents420
Rail cost cents42
Judge cost cents2
Trust safety cents4

Note

Each transaction clears its variable cost with 24.8 percent left over.

Get early access to STUD the day it goes live.