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
A reward claim has to survive a timeout without paying twice.
I own the claim pipeline connecting the Phil mobile app, API, rewards service and Polygon contracts. My work covers contract upgrades, transaction reliability and reconciliation back into the application.
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.
Recorded mainnet deployment transaction from the May 2026 upgrade.
Recorded transaction activating the new rewards implementation.
Deployment evidence: May 2026 implementation and proxy-update transactions linked above.
App users, private service endpoints and confidential incident details are excluded.