# Use on-chain or off-chain to store user data?

**URL:** <https://forum.openzeppelin.com/t/use-on-chain-or-off-chain-to-store-user-data/1638>\
**Category:** General\
**Created:** [October 27, 2019, 5:00pm UTC](https://forum.openzeppelin.com/t/use-on-chain-or-off-chain-to-store-user-data/1638 "2019-10-27T17:00:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 28, 2019, 1:03am UTC](https://forum.openzeppelin.com/t/use-on-chain-or-off-chain-to-store-user-data/1638/2 "2019-10-28T01:03:24Z")

</div>

Hi @Steve_L,

Some points you may want to consider:

- What are the regulatory requirements in the jurisdiction your users (and you) are?
- Could you use a centralized database (do you really need a decentralized solution)?
- Do points have a value?
- How do users obtain points?
- Can points be redeemed for anything?
- Are points transferable? (assume that transferable points may flow from users least likely to redeem, to those most likely to redeem)
- Will users have Ether? (should you consider using the [Gas Station Network](https://docs.openzeppelin.com/openzeppelin/gsn/what-is-the-gsn)?)
- How does the value of points compare with that of gas? (What is the minimum amount of points to use in a mint/transfer operation to make the transaction fee worthwhile)
- If the points have value, then you need appropriate testing (e.g. [Test smart contracts like a rockstar](https://forum.openzeppelin.com/t/test-smart-contracts-like-a-rockstar/1001)) and auditing of your system (e.g. OpenZeppelin performs audits [https://openzeppelin.com/security-audits/](https://openzeppelin.com/security-audits/))

* * *

Some potential options:

- Centralized database tracking users points
- Centralized database tracking users points, with users having the option to withdraw points to tokens above a certain threshold e.g. 100 points (depending on their value).
- Points purely tracked as tokens on Ethereum mainnet
- Points tracked as tokens on a sidechain (e.g. Proof of Authority sidechain such as [xDAI](https://poa.network/xdai), where the network is not trustless but the transaction fees are lower), with potential option to transfer to Ethereum mainnet.

You may also want to look at:

- Using ERC777 tokens (no need to do approve and transferFrom in two separate transactions). See the documentation for details: [https://docs.openzeppelin.com/contracts/2.x/tokens#ERC777](https://docs.openzeppelin.com/contracts/2.x/tokens#ERC777)
- Using the [Gas Station Network](https://docs.openzeppelin.com/openzeppelin/gsn/what-is-the-gsn)

Tagging community member: @paulinablaszk if they wanted to make any suggestions.

---

_[View the full topic](https://forum.openzeppelin.com/t/use-on-chain-or-off-chain-to-store-user-data/1638)._
