> For the complete documentation index, see [llms.txt](https://save-the-life.gitbook.io/save-the-life/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://save-the-life.gitbook.io/save-the-life/white-paper/sl-protocol-architectural-overview/purchase-data.md).

# Purchase Data

<figure><img src="https://12876821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTkK7pMZ0ryZXZhGIl6Qj%2Fuploads%2FnyyG2W7WGaHSFt1m2fw3%2Fimage.png?alt=media&amp;token=652c2485-0176-40c3-a0c1-617b5966c621" alt=""><figcaption><p>Fig.8) Data purchase architecture: A diagram that represents the data purchase protocol.(Architecture In Case of Token Issuance)</p></figcaption></figure>

## Data purchase architecture

The user makes a purchase request through the Data Purchase Web by selecting the category and the number of datasets they wish to buy. Upon receiving this request, the smart contract returns the location and metadata of the medical imaging data storage for that category to the frontend and stores the user's purchase history.

Next, the frontend prompts the user to approve the token transaction through their wallet. Once the user approves the transaction, the smart contract deducts the SL tokens from the user's wallet. After the tokens are successfully transferred, the system burns them by sending them to a burn address.

Upon successful payment, the secure storage system retrieves the requested data from the cloud storage and delivers it to the user. The cost of the purchase is based on the number of datasets and the price at the time of purchase. Please note that this structure may change in the future.
