CRYPTO NEWS

Japan may see a reduced 20% tax on crypto earnings with new proposal

The proposal calls for a separate 20% tax on crypto earnings and exemptions of any tax on crypto gains, with losses carried forward for up to three years.

Is approving a smart contract for ERC20 transfers bad practice?

Some context: I am developing a smart contract and working out a way to charge my users for usage of our service. I am trying to go for a subscription model so they do not have to purchase "credits" for each utilisation (this is important for other reasons) so would like to simply transfer tokens::Listen

Some context: I am developing a smart contract and working out a way to charge my users for usage of our service. I am trying to go for a subscription model so they do not have to purchase "credits" for each utilisation (this is important for other reasons) so would like to simply transfer tokens from their balance every time the service is used (the service automates a task for the user, so the goal is that utilisation occurs without the users input, ie. our servers make a request to our own contract on behalf of the user at an interval, charges the user and completes the task).

Question: Is using the ERC20 approve function to an unlimited amount a bad idea. I understand the security implication of this, but what if there is a max transfer amount hard coded in the contract. I just need to charge a fee percentage on a dynamic value that my contract fetches. Can this be implemented in such a way that mitigates risk to users tokens?

So, keeping in mind, the idea is that the user does not have to interact with our contract except for registering to use our service. We then run some logic in our contract on behalf of the user, and charge the user a fee all without any interaction form the user.

TL;DR: Is there a safe way for users to approve a smart contract to transfer ERC20 tokens (ie. by setting a cap on what that amount can be)

Japan may see a reduced 20% tax on crypto earnings with new proposal

Shopping cart
There are no products in the cart!
Continue shopping
0