-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
ERC 1500: Non-transferrable, configurable vouchers for free usage of dApps #1500
Comments
Hey, james. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1261.md |
There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment. |
eip: 1500
title: Non-transferrable, configurable vouchers for free usage of dApps
author: James Levy (@jamslevy), Chance Wees (@figs999)
discussions-to: ethereum-magicians.org
status: Draft
type: Standards Track
category: ERC
created: 2018-11-05
Simple Summary
A system for facilitating sponsored, non-transferrable and configurable vouchers for dApps. This system is designed to not require any modifications from dApp contracts or front-end code.
Abstract
An on-chain system for facilitating sponsored vouchers that can be redeemed on a specified contract but cannot be transferred or sold, and can be configured to require identity verification to prevent abuse or other factors.
When paired with a gas relayer
meta transaction
system such as the ones designed by the meta cartel, this system allows for new users without funds in their account to not only send transactions, but to purchase collectibles, make transactions on marketplaces, and other operations requiring both gas fees and additional funding.Redeemed voucher funds are sent as a normal transaction from the redeeming user, and support for this system does not require any front-end dApp code or the contract code used by dApps to be modified.
Motivation
The overall goal of providing a more simple and low-friction onboarding process for new users is one of the main challenges for Ethereum to substantially broaden its addressable audience. For those who do not already have cryptocurrency funds available to spend and would like to try one or more decentralized apps, the only option typically available to them is to go through a lengthy fiat onramp process where their bank details must be verified before a purchase of some initial funds can be completed.
While the use of gas relayers and meta transactions helps to reduce this friction for new users, there are a limited number of decentralized apps that only require gas fees. Many of the applications and use-cases of interest require additional funds beyond gas to acquire tokens or NFTs.
Meanwhile, dApp developers struggle to acquire new users amongst an increasingly large volume of apps to choose from.
This system helps both the new users and the app developers seeking additional ways of acquiring users, without requiring dApp developers to modify either their contract code or front-end code.
Specification
Terminology
Vouchers Registry
is a registry contract that allows donors to provide funds used for vouchers and to configure any additional parameters to be used for their donated voucher funds. It also facilitates the redemption of voucher funds by users, and handles a recommended whitelisting process for users.Vouchers User
is a user contract containing functions defined by this EIP required for the redemption of voucher funds, that may also be interoperable with existing user contract standards such as ERC 725 and ERC 1077.Vouchers Registry
The
Vouchers Registry
contract should contain several mappings that are used for maintaining information about donated and redeemed voucher funds, as well as a recommendedaddressIdentityVerified
mapping for whitelisting users:The
Vouchers Registry
contract should also contain several functions that are used for donating and redeeming voucher funds and whitelisting users:addContractVouchers
This payable function is used by voucher donors to provide funds to be used for vouchers. The function accepts a
contractAddress
parameter specifying for which contract the donated funds should be used, as well as aredeemablePerUser
parameter specifying how much funds (in wei) should be redeemable by each user for the specified set of voucher funds. ItwithdrawContractVouchers
This function allows donors to withdraw any unspent funds they have previously donated that have not already been spent. It accepts a
contractAddress
parameter that should match the same parameter specified inaddContractVouchers
and awithdrawAmount
parameter specifying how much of the previously donated funds to withdraw.redeemContractVouchers
This function is called by the
Vouchers User
contract when voucher funds are being redeemed by a user. It checks that the requested funds are available, do not exceed the available allocated amount for the requesting user, and the balance of voucher funds redeemed by the requesting user is updated to the contract's storage, with a small additional gas fee included.This function calls the
forwardRedeemedVouchers
function in theVouchers User
contract:setAddressIdentityVerified
This function contains functionality for having the administrator of the vouchers registry specify users that have gone through an identity verification process that is recommended to avoid abuse of the system via "sybil attacks". The details of this off-chain process are left up to the administrator of the vouchers registry.
Additional functionality may be added by the Vouchers Registry administrator, such as requiring participating contracts to be whitelisted.
Vouchers User
The
Vouchers User
contract contains two functions that are required for the redemption of voucher funds. In the most simple example, it uses an authentication model where authenticated actions are limited to the contractowner
. However, the authentication model can be modified to allow for patterns such asmeta transactions
that may result in additional UX improvements.requestContractVouchers
This function accepts a
contractAddress
parameter anddonorAddress
parameter that are used to determine which voucher funds the user is redeeming. A future iteration of this system may potentially eliminate the need for the user to specify adonorAddress
parameter.The function calls the
redeemContractVouchers
function of theVoucher Registry
contract:That function, in turn calls
forwardRedeemedVouchers
function of theVoucher User
contract.forwardRedeemedVouchers
This function is called from the
redeemContractVouchers
function of theVoucher Registry
contract.Implementation
Voucher Registry Contract
Voucher User Contract
In this example, direct authentication is used where transactions requesting the redemption of voucher funds must be made by the
Voucher User
contract owner.Roadmap
Variation using
meta transaction
authentication instead of direct authentication for theVoucher User
contract.Variation where the user does not need to specify the
donorAddress
, and are automatically matched with the best available voucher funds to use for a specified contract.Copyright
Copyright and related rights waived via CC0.
The text was updated successfully, but these errors were encountered: