Skip to content

Commit

Permalink
chore(docs): update content for legal (#90)
Browse files Browse the repository at this point in the history
Resolves DEVRL-704, DEVRL-708, DEVRL-709, DEVRL-711

- Made edits to the description of the Paymaster in quickstart and
zksync 101.
- Added disclaimers to paymaster page for quickstart and zksync 101.
- Added a Paymaster entry to the Glossary.
- Added a disclaimer to the ERC20 page for quickstart.
  • Loading branch information
itsacoyote authored Jun 3, 2024
1 parent f00f952 commit 1bca15a
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 28 deletions.
10 changes: 10 additions & 0 deletions content/00.build/05.quick-start/4.erc20-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ items: [{
- **zkSync is EVM compatible** and supports existing smart contract libraries like OpenZeppelin
- **Use popular libraries like** `ethers` , `viem`, or `web3.js` to interact with smart contracts deployed on zkSync.

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
The ERC20 token code is provided “as is” without any express or implied warranties.

- The regulatory regime governing digital assets is still developing and is unclear in many jurisdictions.

- ERC20 tokens may possess unique legal, tax, and market risks, so it is up to you to determine which, if any, laws apply to your deployment of ERC20 tokens.

- The developers and publishers of this software disclaim any liability for any legal issues that may arise from its use.
::

## Next steps

- Join the [zkSync developer community in Discord](https://join.zksync.dev/) where you can ask any questions about this tutorial in the #dev-101
Expand Down
41 changes: 25 additions & 16 deletions content/00.build/05.quick-start/5.paymasters-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ In this tutorial we will:
[you’ve configured the %%zk_testnet_name%% in your browser wallet by following the instructions here](/build/connect-to-zksync).
1. In addition, fund your wallet with %%zk_testnet_name%% ETH using [one of the available faucets](/ecosystem/network-faucets).

## What is a paymaster?
## What is a Paymaster?

Paymasters are smart contracts with a very specific function: pay the transaction fees on behalf of the user. In order
to do so, paymasters have ETH balance which they use to pay the transaction fees to the protocol.
Paymasters in the zkSync ecosystem represent a groundbreaking approach to handling transaction fees.
They are special accounts designed to subsidize transaction costs for other accounts,
potentially making certain transactions free for end-users.
This feature is particularly useful for dApp developers looking
to improve their platform's accessibility and user experience by covering transaction fees on behalf of their users.

Being smart contracts, paymasters can have logic and validations to pay, or not the transaction fees.
Every paymaster has the following two functions:

Every paymaster has these two functions:
- `validateAndPayForPaymasterTransaction` : this function uses the transaction parameters (fields like `from`, `amount` , `to`
) to execute the required validations and pay for the transaction fee.

- `validateAndPayForPaymasterTransaction` : it receives the transaction parameters (fields like `from`, `amount` , `to`
), use these to do the required validations, and pay the transaction fee.
- `postTransaction`: this function runs after the transaction is executed and it’s optional.
- `postTransaction`: this optional function runs after the transaction is executed.

![zksync paymaster](/images/101-paymasters/zksync-paymaster.png)

Expand All @@ -42,12 +44,19 @@ Every paymaster has these two functions:
Although application developers are encouraged to create their own paymaster smart contract, zkSync provides a testnet
paymaster for convenience and testing purposes.

::callout{icon="i-heroicons-light-bulb"}
The testnet paymaster address is
[0x3cb2b87d10ac01736a65688f3e0fb1b070b3eea3](https://sepolia.explorer.zksync.io/address/0x3cb2b87d10ac01736a65688f3e0fb1b070b3eea3)
::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
The paymaster smart contract code is provided "as-is" without any express or implied warranties.
<br />

- Users are solely responsible for ensuring that their design, implementation,
and use of the paymaster smart contract software complies with all applicable laws,
including but not limited to money transmission, anti-money laundering (AML), and payment processing regulations.

- The developers and publishers of this software disclaim any liability for any legal issues that may arise from its use.
::

Here is the code:
The testnet paymaster address is
[0x3cb2b87d10ac01736a65688f3e0fb1b070b3eea3](https://sepolia.explorer.zksync.io/address/0x3cb2b87d10ac01736a65688f3e0fb1b070b3eea3)

::drop-panel
::panel{label="TestnetPaymaster.sol"}
Expand Down Expand Up @@ -140,10 +149,10 @@ Here is the code:

In the `validateAndPayForPaymasterTransaction` it is:

1. checking that the paymasterInput is `approvalBased`.
2. checks that the allowance of a given ERC20 is enough.
3. Transfers the transaction fee (`requiredETH`) in ERC20 from the user’s balance to the paymaster.
4. Transfer the transaction fee in ETH from the paymaster contract to the bootloader.
1. Checking that the paymasterInput is `approvalBased`.
2. Checking that the allowance of a given ERC20 is enough.
3. Transferring the transaction fee (`requiredETH`) in ERC20 from the user’s balance to the paymaster.
4. Transferring the transaction fee in ETH from the paymaster contract to the bootloader.

## How to send a transaction through a paymaster?

Expand Down
18 changes: 15 additions & 3 deletions content/00.build/10.zksync-101/50.paymaster.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ fees in ERC20 tokens on zkSync Era, using Hardhat or Foundry.
Embark on this journey to understand how paymasters can add a new layer of functionality and user-friendliness
to your decentralized applications.

## What are Paymasters?
## What is a Paymaster?

Paymasters in the zkSync ecosystem represent a groundbreaking approach to handling transaction fees.
They are special accounts designed to subsidize transaction costs for other accounts, potentially making
certain transactions free for end-users. This feature is particularly useful for dApp developers looking
They are special accounts designed to subsidize transaction costs for other accounts,
potentially making certain transactions free for end-users.
This feature is particularly useful for dApp developers looking
to improve their platform's accessibility and user experience by covering transaction fees on behalf of their users.

## Built-in Paymaster Flows
Expand All @@ -43,6 +44,17 @@ As we explore paymasters, remember that while they offer enhanced flexibility fo
implementation should always prioritize security and user trust. This guide aims to equip you with the knowledge
to effectively incorporate paymasters into your zkSync projects, paving the way for more user-friendly and accessible dApps.

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
The paymaster smart contract code is provided "as-is" without any express or implied warranties.
<br />

- Users are solely responsible for ensuring that their design, implementation,
and use of the paymaster smart contract software complies with all applicable laws,
including but not limited to money transmission, anti-money laundering (AML), and payment processing regulations.

- The developers and publishers of this software disclaim any liability for any legal issues that may arise from its use.
::

---

## Paymaster flow
Expand Down
5 changes: 5 additions & 0 deletions content/00.build/95.resources/20.glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ EVM Compatible means that a percentage of the opcodes of Ethereum’s EVM are su
thus, a percentage of smart contracts work out of the box.
zkSync is optimized to be EVM source-code compatible (with a custom compiler), not EVM equivalent.

### Paymaster

A Paymaster is an account on the zkSync network that can cover transaction fees for users.
It can pay these fees directly and allow users to reimburse the fees using various digital assets.

### SNARK (Succinct Non-Interactive Argument of Knowledge)

SNARKs are a kind of zero-knowledge proof system that are short and quick to verify.
Expand Down
8 changes: 5 additions & 3 deletions content/20.zksync-node/00.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ This documentation explains the basics of the zkSync Era Node.

## Disclaimers

- The zkSync node software is provided "as-is" without any express or implied warranties.
- The zkSync node is in the beta phase, and should be used with caution.
- While in beta, the zkSync node is dependent on a DB snapshot in order to run that is not yet publicly available.
- The zkSync node is a read-only replica of the main node. We are currently working on decentralizing our
infrastructure by creating a consensus node. The zkSync node is not going to be the consensus node.
- The zkSync node is a read-only replica of the main node.
- The zkSync node is not going to be the consensus node.
- Running a sequencer node is currently not possible and there is no option to vote on blocks as part of the consensus mechanism
or [fork-choice](https://eth2book.info/capella/part3/forkchoice/#whats-a-fork-choice) like on Ethereum.

## What is the zkSync Node?

Expand Down
20 changes: 16 additions & 4 deletions content/30.ecosystem/10.bridges.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Bridges
description:
description:
---

Bridges are pivotal in enhancing interoperability between different networks or layers, facilitating seamless asset and
Expand All @@ -17,6 +17,17 @@ For an extended list of bridging options within the zkSync ecosystem, feel free
The [Portal Bridge](https://bridge.zksync.io/) on zkSync provides a gateway for assets between Ethereum and the zkSync
network, ensuring secure and efficient transfers.

## Across

[Across Bridge](https://app.across.to/bridge) is the most efficient, secure, and fastest way to transfer assets across blockchains.
It features gas-optimized contracts, aggregated verification, and an intents-based design for maximum capital efficiency.
Leveraging a competitive network of relayers, Across ensures bridge orders are filled within seconds.

## MES Protocol

[MES Protocol](https://mesprotocol.com/) is a cross-chain bridge that provides instant, low-cost and easy-to-use asset
transfer between EVM and non-EVM compatible chains.

## Omnibtc Finance

[Omnibtc Finance](https://www.omnibtc.finance/) operates as a decentralized platform offering cross-chain swap, lending,
Expand All @@ -32,7 +43,8 @@ protocol designed to enable safe, economical, and swift transfer of messages or
[Owlto Finance](https://owlto.finance/) is focused on creating a decentralized cross-rollup bridge, emphasizing layer 2
solutions to promote scalability and interoperability.

## MES Protocol
## Symbiosis

[MES Protocol](https://mesprotocol.com/) is a cross-chain bridge that provides instant, low-cost and easy-to-use asset
transfer between EVM and non-EVM compatible chains.
[Symbiosis](https://app.symbiosis.finance/bridge) is a cross-chain AMM DEX that pools together liquidity from different networks:
L1s and L2s, EVM and non-EVM.
With Symbiosis, you can easily swap any token and move your assets across different networks.
14 changes: 14 additions & 0 deletions content/30.ecosystem/30.data-indexers.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,26 @@ helps developers focus on business logic instead of writing a boilerplate to sto
data. DipDup-based indexers are selective, which means only required data is requested. This
approach allows to achieve faster indexing times and decreased load on underlying APIs.

## Dune

[Dune](https://dune.com/home) is a powerful data indexing service for blockchain,
providing a comprehensive platform to query, visualize, share, and export data across 30+ blockchains.
It enables users to collaboratively build and analyze blockchain data with the support of Web3's largest data community,
making it an essential tool for anyone involved in the crypto space.

## Flair

[Flair](https://docs.flair.dev/) offers reusable **indexing primitives** (such as
fault-tolerant RPC ingestors, custom processors, re-org aware database integrations)
to make it easy to receive, transform, store and access your on-chain data.

## Goldsky

[Goldsky](https://goldsky.com/) is a data indexer for web3 builders,
offering high-performance subgraph hosting and realtime data replication pipelines.
Goldsky offers two core self-serve products, Subgraphs and Mirror,
that can be used independently or in conjunction to power your data stack.

## Graph Network

[The Graph](https://thegraph.com/) is a decentralized protocol for indexing and querying
Expand Down
20 changes: 20 additions & 0 deletions content/30.ecosystem/50.monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ solutions, aiding developers in keeping a close watch on their projects within t
ecosystem. These tools provide a platform for analytics, real-time monitoring, and data
aggregation which are essential for making informed decisions.

## Elliptic

[Elliptic](https://www.elliptic.co/), a leader in cryptoasset risk management, has integrated support for zkSync,
a Layer 2 scaling solution for Ethereum, to bolster its blockchain analytics capabilities.
This partnership enables organizations building on zkSync, such as hybrid exchange GRVT,
to use Elliptic's real-time wallet and transaction screening tools for efficient compliance and risk management.
The integration leverages zkSync's scalable, low-cost solution to Ethereum's high gas fees and slow transactions,
enhancing security and transparency.
This collaboration signifies a significant step in providing comprehensive blockchain support
and advancing the zkSync ecosystem with robust analytics tools.

## Coinfirm / Lukka

[Lukka and Coinfirm](https://lukka.tech/) have joined forces with zkSync to provide advanced wallet screening solutions for the zkSync network.
As the preferred provider for crypto-asset funds and fund service providers, Lukka is trusted by industry leaders such as State Street,
Polychain, and eToro for its precise reporting and Enterprise Data Management solutions.
Coinfirm's blockchain analytics platform offers robust transaction, wallet, and cluster monitoring for crypto assets.
This partnership will enhance zkSync's ecosystem by ensuring accurate and comprehensive wallet screening,
supporting secure and transparent operations for users and businesses.

## Dune Analytics

[Dune Analytics](https://dune.xyz/docs) is a web-based platform tailored for querying public
Expand Down
2 changes: 1 addition & 1 deletion content/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description:
navigation: false
hero:
title: 'Unlock the Potential of Layer 2 Scaling with zkSync'
description: 'Explore comprehensive guides, developer tools, and resources to innovate on the zkSync platform.'
description: 'Explore comprehensive guides, developer tools, and resources to innovate on zkSync.'
orientation: vertical
links:
- label: Start building on zkSync
Expand Down
3 changes: 2 additions & 1 deletion cspell-config/cspell-misc.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Code4rena
Consensys
Cyfrin
GRVT
Hola
Immunefi
initializable
Initializable
Lukka
mathbb
mundo
permissioned
upgradability
Winternitz

0 comments on commit 1bca15a

Please sign in to comment.