Off-chain accounting, on-chain payment
Commissions accrue in PostgreSQL. A claim settles through an ERC-20 treasury transfer on Polygon, signed with AWS KMS.
Case 03 · Commissions · Polygon claims
Ambassadors earn referral commissions and claim tokens on Polygon.
Ambassadors earn commissions when their referral network buys PRO or promotes posts. I built commission accounting and the Polygon claim pipeline: eligibility checks, balance reservation, AWS KMS-signed ERC-20 transfers and receipt reconciliation, plus member and admin interfaces.
Backend and backoffice API in production since September 2026, including Polygon treasury claims. Member and admin interfaces delivered to development.
Commission earnings must remain explainable from the original activity through to the final transfer. Retries, pending transactions and concurrent claims must not silently produce duplicate payouts.
Built Polygon ERC-20 treasury payouts with AWS KMS signing, transaction tracking and receipt reconciliation.
Reserved balances, serialized nonce allocation for concurrent claims and released earnings after failed broadcasts.
Built referral attribution, the commission ledger, member claim views and administrative tooling.
A referral buys PRO or boosts a post. The backend attributes the purchase and records the ambassador’s commission.
PRO or boost purchase → ambassador commissionEach commission traces back to a qualifying purchase.The member requests a claim. The backend checks eligibility and reserves available commission earnings transactionally before submitting a payment.
POST /claim → eligible balance → reservedConcurrent claims must not spend the same earnings.AWS KMS signs the ERC-20 treasury transfer. Nonce allocation is serialized across concurrent claims; broadcast failures release the reserved earnings.
Reserved → signed transfer → transaction hashA failed broadcast must not leave earnings locked.The monitor reads the Polygon transaction receipt, reconciles the claim status and shows the payment outcome to the member.
Transaction hash → receipt → claim statusSubmission and confirmation are tracked separately.Commissions accrue in PostgreSQL. A claim settles through an ERC-20 treasury transfer on Polygon, signed with AWS KMS.
Balance reservation, nonce serialization and receipt reconciliation connect financial accounting to the actual transaction lifecycle.
The walkthrough documents treasury settlement, concurrent-claim handling and failed-broadcast recovery from the implementation records.
September release records distinguish deployed APIs from the development-stage member and admin screens.
Status follows the September 2026 implementation and release records. Ambassador appointment is managed through the backoffice.
Backend and backoffice API in production; member and administrative screens delivered to development.