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

OnChain Discount Voucher #415

Closed
5 tasks
alirezatabatabaeian opened this issue Jan 13, 2024 · 8 comments
Closed
5 tasks

OnChain Discount Voucher #415

alirezatabatabaeian opened this issue Jan 13, 2024 · 8 comments
Labels
Developer Tool Related to tools or utilities used by developers

Comments

@alirezatabatabaeian
Copy link
Contributor

alirezatabatabaeian commented Jan 13, 2024

Summary

The TON Discount Voucher Smart Contract proposal aims to revolutionize the payment landscape within the blockchain field by introducing an innovative solution for facilitating discounts through The Open Network (TON). This project proposes the development of a smart contract that serves as a digital voucher, enabling users to avail themselves of discounts while executing payments on the TON blockchain.

Context

Blockchain technology, with its decentralized and secure nature, has transformed the way transactions are conducted. The Open Network (TON), being one of the prominent blockchain platforms, offers a unique environment for creating decentralized applications (DApps) with its robust infrastructure and high-performance capabilities.
In the world of commerce, discounts and promotions play a crucial role in attracting and retaining customers. Traditional discount mechanisms often involve complex processes and intermediaries, leading to inefficiencies and increased costs. The proposed TON Discount Voucher Smart Contract addresses these issues by leveraging the capabilities of smart contracts on the TON blockchain.

Technical Detail

  • The Smart Contract will include a parameter named discount_percent, representing the percentage of the discount associated with the voucher. This parameter will be a dynamic value, allowing flexibility in configuring different discount percentages.
  • To implement the cumulative discount feature, the smart contract will incorporate a mechanism to add up new discounts to the existing discount_percent. This ensures that users can accumulate multiple discounts over time.
  • To mimic the non-transferable nature of Soul Bond Tokens (SBT), the TON Discount Voucher Smart Contract will be designed to prevent the transfer of vouchers between users. This restriction ensures that the discount is associated with the original user and cannot be transferred to another address.

How it works

  • Consider TonAPI held a contest and it wants to award a discount voucher to all the participants for its paid products. The discounter(TonAPI) deployes a voucher for each participant containing a field called owner(contest participant's wallet), discounter_wallet(TonAPI unique wallet), and discount_percent. The discounter_wallet proves this voucher issued and belongs to TonAPI. Also, only discounter_wallet can manipulate the discount precent so that it ensures the safety.
  • If the user wins another discount, the new and previous one will be summed up. This can incentivize the users to collect discounts by participating in different contests and make a free use of the product!
  • If the user wants to use his/her discount voucher, he/she connects the wallet to website(TonAPI) and the web calculates the discount contract address and by running the get method, it finds the discount percent and let the user to use it. After the user has used the voucher, the discounter(TonAPI wallet) sends a message to the discount contract and zeros the discount_percent.

Expected Impact:

  1. Cost Efficiency: Reduce transaction costs associated with traditional discount methods by eliminating intermediaries and streamlining the discount process through smart contracts.
  2. Increased Adoption of TON: Encourage businesses and consumers to leverage the TON blockchain for everyday transactions, boosting the adoption rate of the platform.
  3. Innovation in Commerce: Pioneer a novel approach to discounts in the blockchain space, setting a precedent for innovative use cases within the broader blockchain community.

Definition of Done

  • Develop a ready to use Smart Contract
  • Test and Deployment in TestNet
  • A full guide about the integration of contracts into real world products and Applications
  • Contract’s Message Flow
  • A Lifetime support for the contract and help for integrating it into TON Products

References

I couldn't find any similar contract. I believe that it might be an innovative idea.

Estimate suggested reward

1000 USD in TON

@alirezatabatabaeian alirezatabatabaeian added the Developer Tool Related to tools or utilities used by developers label Jan 13, 2024
@nessshon
Copy link
Contributor

nessshon commented Jan 13, 2024

Hello @alirezatabatabaeian,

Could you please share your opinion on how your proposed smart contract is better than NFT SBT? After all, you can already create NFT SBTs and specify attributes in them, such as "Discount percentage: 10%". I may have misunderstood something in your concept.

@alirezatabatabaeian
Copy link
Contributor Author

alirezatabatabaeian commented Jan 14, 2024

Hello dear @nessshon
It's totally like the combination of a SB-NFT and editable-NFT.
I just couldn't find a similar implementation. I feel the combination of these two can make a new standard with the application in discount vouchers.
Also, it might lower the overall gas usage of minting and editing the pseudo-NFT.
Thanks for your nice comment.

@delovoyhomie
Copy link
Collaborator

@aSpite @ProgramCrafter, hey folks! Could I ask you to describe your opinion about this contract 🙂

@ProgramCrafter
Copy link
Contributor

@delovoyhomie Hello! I see that this contract can have a bit of additional functionality compared to SBT:

  1. being able to forward money through SBT and its collection (so that service just validates that payment has come through its discounts collection and reduces the expected value);
  2. having limited value (for instance, 99% discount capped at 25 TON); common NFTs and SBTs don't support changing attributes onchain well.

So I think this contract is worth it. I'd suggest to pay $600 at its creation + guide to use, and then $500 evaluated by its usage in real projects.

@aSpite
Copy link
Contributor

aSpite commented Feb 27, 2024

@delovoyhomie, hi.

The advantages of this approach over a centralized solution are unclear to me. Let's take the same TonAPI as an example. To record these discounts, process them, change them, and so on, it is necessary to build a whole functionality on the backend side instead of simply adding and then updating 1 column in the SQL database.

It will be much more reliable, faster and cheaper. The user will initially be required to transfer fewer funds, and no calculations will need to be carried out on the blockchain.
At the same time, waiting for an update every time the transaction has passed and the percentage has been updated is pretty expensive.

Maybe I'm wrong, and there are cases of using such a system. In that case, I would be glad to hear about them.

@ProgramCrafter
Copy link
Contributor

@aSpite There can be services fully paid onchain - for instance, sale contracts for TON domains, or subdomains of those. Discount vouchers can be fitting for that use case.

Considering offchain payments, voucher SBTs improve transparency (though services might want not to disclose how many users have discounts).

@aSpite
Copy link
Contributor

aSpite commented Feb 27, 2024

@ProgramCrafter

Why might discounts be needed when selling TON domains, and won't it complicate the sales scheme, on the contrary, by adding new transactions to the TX chain? At the same time, who will manage the discount percentage? Isn't a centralized service that can initially put this discount into sales contracts?

@alirezatabatabaeian
Copy link
Contributor Author

alirezatabatabaeian commented Feb 28, 2024

Hi @delovoyhomie @ProgramCrafter @aSpite
Thanks for your helpful comments on this bounty.

I think the benefits of on-chain vouchers are a bit misunderstood. So, I start by describing the benefits(the below explanations are extracted from web):

1- Identify the Ownership of Vouchers: For non-blockchained vouchers, ownership of the vouchers cannot be easily identified by the receivers. People other than the issuers may not have the same authority or means to establish the true ownership. As a result, non-blockchained vouchers may experience a declining level of trust. For blockchained vouchers, however, ownership can easily and unmistakably be established due to the nature of blockchain technology.

2- Avoid Fraud: For non-blockchained vouchers, fraud may be difficult for ordinary people but not impossible for IT experts or hackers. Furthermore, the security levels of non-blockchained vouchers can vary greatly, depending on the security technology used. For blockchained vouchers, however, fraud is much more difficult. Each blockchained vouchers is unique in its own right.

3- Lower System Failure Risk: System failure could be a vulnerability for digital vouchers. Systems can fail, and servers can fail, and hard disks can fail, and software can fail. In our experience, most failures or delays affecting digital vouchers have little to do with the vouchers platform itself and more to do with the systems employed by participating merchants. For any centralized system, systems failure implies a loss of all functionality. For decentralized systems using blockchain technology, failure of any single system means just replacement by some other system. No vouchers functionality will be affected by the failure of any single systems in blockchain technology.

4- More Transparent on Voucher Data: Blockchain technology, by nature, is transparent and open to all. In limiting the extent to which information can be hidden, the public’s trust is deepened and the credibility of such vouchers is enhanced. The transparency of blockchain is visible in cryptocurrencies too. With non-blockchained vouchers, issuers may find it easier to keep information hidden from the public or general recipients – with negative consequences for public trust and credibility.

5- More Secure with Decentralization: Blockchain technology is more secure because all data is comprised of multiple decentralized actions / transactions which are verified by consensus and stored in many different unrelated terminals throughout the world. Even with the highest security level, any centralized system has a fatal weak point. The weak point essentially revolves around the access rights to that centralized system. If anyone hacks into the system, or if any person with authorized access corrupts the system, even the strongest security measures may not be sufficient. The same vulnerability does not exist with decentralized networks. The decentralized nature is the reason why cryptocurrency is widely accepted among investors and traders. It offers robust security and strives to preserve privacy, which entices people to opt for cryptocurrency and benefit from crypto trading.

6- Even more Precise Marketing based on Big Data Analysis: All digital vouchers can capture some level of data for analysis by their issuers. But for blockchain vouchers, the scale of data capture differs by a matter of degree. As blockchain technology is designed for open platforms, this means that all data relating to all vouchers campaigns by all issuers forms the core of “big data” for global coupon marketing. With this big data, marketing becomes even more precise, encouraging all merchants around the world to join the platform so as to share the benefits.

If there is any other question, don't hesitate to ask.

@alirezatabatabaeian alirezatabatabaeian closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Tool Related to tools or utilities used by developers
Projects
None yet
Development

No branches or pull requests

5 participants