Reconcile from events
Use finalized chain evidence to close the payment loop instead of relying on the lifetime of an HTTP request.
Case 02 · App-to-chain integration
Social activity and referrals in PhilSocial lead to PHL rewards and support for causes.
PhilSocial combines social engagement, referrals and support for causes. Earned rewards are paid in PHL on Polygon. I own the claim integration across the app, backend and contracts, including upgrades, transaction retries and payment confirmation.
Shipped the RewardsLibrary V2.1 upgrade to Polygon and strengthened the claim pipeline with deduplication and a confirmer that reconciles finalized contract events with application records.
An API timeout does not mean a blockchain transaction failed. The system needs to handle retries without paying twice and show the member a result that matches what actually happened on-chain.
Owned the integration from the app request through the API and rewards server to the contract.
Implemented and deployed the V2.1 rewards upgrade, including a usable rollback target.
Fixed gas and retry behavior, hardened duplicate prevention and added event-based claim confirmation.
A member requests a claim. The application checks the reward and records the request before it reaches the transaction service.
App → API → claim recordThe member action has an application identity.The rewards service coordinates the transaction, with deduplication and gas handling designed around the fact that an earlier request may still be mining.
Claim identity → transactionA timeout is not permission to create another payment.The rewards contract processes the claim. The V2.1 implementation changed the claim execution path while preserving the existing proxy integration.
RewardsLibrary V2.1Contract execution is the authority for the payment.The confirmer reads ClaimExecuted events at finalized blocks and brings the application record into agreement with the chain.
ClaimExecuted → confirmed recordSubmitted and confirmed are different states.Use finalized chain evidence to close the payment loop instead of relying on the lifetime of an HTTP request.
The proxy could not re-register its original implementation. I deployed a fresh instance of the previous logic to make rollback operationally possible.
Official explanation of the social app, rewards and giving. My scope here is the blockchain integration.
Transaction activating the new rewards implementation.
Product context from PhilSocial. Implementation scope follows the rewards integration records; the May 2026 proxy-update transaction is linked above.
App users, private service endpoints and confidential incident details are excluded.