## Onchain

Farcaster’s onchain systems are implemented as [contracts on OP Mainnet](https://docs.neynar.com/farcaster/learn/architecture/contracts). Actions are performed onchain only when security and consistency are critical. Use of onchain actions is kept at a minimum to reduce costs and improve performance. Only a handful of actions are performed onchain, including:

- Creating an [account](https://docs.neynar.com/farcaster/learn/what-is-farcaster/accounts).
- Paying rent to [store data](https://docs.neynar.com/farcaster/learn/what-is-farcaster/messages#storage).
- Adding account keys for [connected apps](https://docs.neynar.com/farcaster/learn/what-is-farcaster/apps#connected-apps).

## Offchain

Farcaster’s offchain system is a peer-to-peer network of servers called [Snapchain](https://snapchain.farcaster.xyz/) which store user data. The majority of user actions are performed offchain. These include:

- Posting a new public message.
- Following another user.
- Reacting to a post.
- Updating your profile picture.

Actions are performed offchain when performance and cost are critical. Use of offchain actions is typically preferred when consistency isn’t a strict requirement. Offchain systems achieve security by relying on signatures from onchain systems.
