Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golmek/deposit updates #312

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ type: Tutorial

## Introduction

Since Yagna 0.16, Golem offers a new way to pay for tasks indirectly (via a smart contract) called Deposits. As a result, the Golem protocol doesn't require funds for the Provider to be sent from the Requestor wallet. This new payment method covers use cases where services created on top of Golem allow end-users to pay for tasks orchestrated by the service.
Since Yagna 0.16, Golem offers a new way to pay for tasks indirectly (via a smart contract) called Deposits. As a result, the Golem protocol doesn't require funds for the Provider to be sent from the Requestor wallet. This new payment method covers use cases where services created on top of Golem allow end-users to pay for tasks orchestrated by the service. General overview of a deposit payments can be found [here](https://docs.golem.network/docs/golem/payments/deposits).

![image](/golem/payments/deposit-payment-wbg.png)

## Tutorial scenario

Expand All @@ -27,6 +29,19 @@ Here are the main steps of the scenario:
1. The Funder creates a deposit for the Requestor using the LockPayment contract and passes the deposit ID to the Requestor.
2. The Requestor runs the computations and uses the deposit to pay the providers for resources.

## Holesky testnet tokens

To use Holesky test network you will need both Holesky tETH and Holesky tGLM. To obtain Holesky tETH feel free to use one of the following faucets:

- [tETH Faucet 1](https://holesky-faucet.pk910.de/)
- [tETH Faucet 2](https://faucet.quicknode.com/ethereum/holesky)
- [tETH Faucet 3](https://faucet.chainstack.com/holesky-testnet-faucet)
- [tETH Faucet 4](https://www.holeskyfaucet.io/)

After You obtain some tETH, you can request tGLM tokens from tGLM Smart Contract by calling the `Create` function:

- [tGLM Faucet Smart Contract](https://holesky.etherscan.io/address/0xface100969ff47eb58d2cf603321b581a84bceac)

## Code organization

The code is organized across several files:
Expand Down
6 changes: 5 additions & 1 deletion src/pages/docs/golem/payments/deposits.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In this scenario:

- Requestor is becoming a **Service Owner**, who runs Yagna to provide services to the **End Users**. Because the Provider is paid from End-user funds via Smart Contract, the Service Owner does not need to hold any GLM in his wallet at any point in time. MATIC/ETH tokens are still needed to cover transaction costs, however.
- **Provider** role remains intact. The only difference is a new source of payment, it is a Smart Contract.
- The **End User** also known as **Funder** role is a new one. A person who wants to use Services built on top of the Golem Network but is not interested in setting up and maintaining the Yagna node. This role requires some crypto wallet (for instance Metamask) with GLM and MATIC/ETH tokens to create a **Deposit**, which will be used to cover the Provider's costs. Thankfully, Metamask setup and required tokens might be easily obtained by End-User via Golem Onboarding Portal - https://glm.golem.network/
- The **End User** also known as **Funder** is a new role. A person who wants to use Services built on top of the Golem Network but is not interested in setting up and maintaining the Yagna node. This role requires some crypto wallet (for instance Metamask) with GLM and MATIC/ETH tokens to create a **Deposit**, which will be used to cover the Provider's costs. Thankfully, Metamask setup and required tokens might be easily obtained by End-User via Golem Onboarding Portal - https://glm.golem.network/

What is important, thanks to the Deposit Smart Contract, we are also able to introduce new cash flow from End-User to Service Owner/Requestor. This new cash flow might be used by the Service Owner/Requestor to introduce an optional service fee, which can be used to make the Service Owner/Requestor role profitable.

Expand All @@ -37,3 +37,7 @@ We provide an implementation of the deposit contract interface on [ethereum](htt
## Specification

The interface and examples of use are documented in [golem-architecture](https://github.com/golemfactory/golem-architecture/blob/master/specs/deposits.md).

## Example

JS example utilizing deposit payments can be found [here](https://docs.golem.network/docs/creators/javascript/tutorials/using-deposit-payment-scheme).
Loading