Point Issuance

Purchase Data Storage

To enable validators to verify purchases, purchase data generated by the payment system is recorded on the blockchain and made public. The diagram above illustrates the process by which confirmed purchase transactions are stored in the payment system server’s smart contract and on AWS S3. Purchase data is stored as blockchain records, with a new block generated periodically and multiple purchase entries recorded within a single block. Each block's hash is calculated, and the current block’s hash is included in the header of the next block. The smart contract records both the block number and its hash. Additionally, blocks containing purchase data are stored more securely and permanently on AWS S3, with each block's file name set to its corresponding hash.

Purchase Data Verification

When a purchase made by a kiosk user who wishes to collect points is confirmed, a certain percentage of the purchase amount is credited to the user’s account via the smart contract.

  • For users who have not installed the app, temporary points are issued. Temporary points are credited in accordance with the hash of the user’s phone number.

  • Validators review the purchase records stored on the blockchain one by one. Once a purchase is deemed valid for payment, they record the relevant information on the "Loyalty Ledger smart contract." When the required number of validator quorum is reached, points are immediately credited to the purchaser’s account.

  • For users who have installed the app, points are credited to an account that matches the wallet address stored in the app. These points can be used directly at kiosks.

Last updated