mamonet GitHub avatar

take-rate-controller

mamonet

一个快速、确定性的控制器,用于设定每笔交易的佣金(抽成率),以达到总体目标,同时保护低价值交易中的对手方。

Stars

5

7 天增长

暂无数据

Fork 数

1

开放 Issue

0

开源协议

暂无数据

最近更新

2026-07-28

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它采用控制环而非大型模型;确定性、可审计且资金安全,解决了市场平台动态抽成而不对低价值工作过度征税的需求。

适合谁使用

  • 市场平台开发者
  • 构建支付/货币化系统的金融科技工程师
  • 管理佣金策略的运营团队

典型使用场景

  • 网约车服务的动态佣金设置
  • 配送平台每笔交易费用
  • 自由职业市场佣金优化
  • 任何需要总体抽成率收敛的市场

项目优势

  • 资金安全:无浮点数、检查恒等式、硬钳位输出
  • 超时或失败时的确定性回退
  • 积分抗饱和使长时间钳位后收敛平稳
  • 每个细分配置可热加载

使用前须知

  • 可复用引擎,非完整平台产品
  • 需与市场交易系统集成
  • 信号调制参数可能需要针对领域调整

README 快速开始

take-rate-controller

A fast, deterministic controller that sets a per-transaction commission (take rate) to hit an aggregate target, while protecting the counterparty on the unattractive transactions.

Marketplaces usually want an overall take rate, say 20%, without charging the same percentage on every transaction. A flat rate is simple but crude: it over-taxes low-value or hard-to-serve jobs and leaves value on the table on attractive ones. take-rate-controller decides each transaction's commission inside configured bounds so that the running effective take rate converges on the target, lowering or zeroing commission on low-value or low-demand transactions to protect earnings, and taking a little more on high-demand ones.

It is a control and optimization problem, so it is built as a control loop, not a large model: each decision is arithmetic plus a bounded, explainable modulation, returned in microseconds, fully auditable, and safe for money.

Scope note: a generic marketplace take-rate engine (rides, delivery, services). Deterministic at inference, with no LLM anywhere in the money path. This is the reusable engine, not a clone of any one platform's product.


How it works

flowchart LR
    Req[amount, tax, segment] --> V[validate]
    V --> C[controller\ntarget vs current effective]
    C --> M[signal modulation\ndemand / supply / opportunity]
    M --> K[clamp to segment bounds]
    K --> D[decision: commission %, amount, payout]
    Done[completed txns] -. async .-> Agg[running aggregates] --> C
    D --> L[decision log]
    C -. timeout / failure .-> FB[safe fallback] --> D
  • Per-segment config: a zero-commission threshold, a minimum, a maximum, and a target, held in memory and hot-reloadable.
  • Closed-loop control: proportional and integral correction on the gap between the running effective take rate and the target, so the aggregate lands where it should over time.
  • Signal modulation: each decision is nudged by demand, supply, and opportunity scores, down to protect low-value or low-demand transactions, up on high-demand ones.
  • Money-safe by construction: minor units or decimals, never floats; commission taken on the amount after tax; the invariant commission + payout == amount_after_tax is checked; the result is hard-clamped so a payout can never go negative or out of bounds.

项目描述

Deterministic PI control loop that sets per-transaction marketplace commission to converge on an aggregate take-rate target, with integer money, hard bounds, and a guaranteed fallback.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

slvDev
精选
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI 与机器学习大语言模型
1,960
jamesob
精选
jamesob GitHub avatar

local-llm

A comprehensive guide for building and configuring a high-end local machine to run state-of-the-art LLMs, with detailed hardware choices, BIOS tuning, and Docker-based model serving.

AI 与机器学习大语言模型
1,660
makecindy
精选
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI 与机器学习大语言模型
958