Let's say I have a platform that gives incentives to users as ERC20 tokens when the users wrote some good articles.

At this point, from which account ERC20 tokens should be transferred to users?

Is it from the EOA owner address that owns all ERC20 tokens? or should it be from the ERC20 contract address?

In the former case, I think it'd be very tedious since EOA owner address needs to go through approve() & allowance()steps for each case and this is not realistic (ex: 1,000 cases per day). Also, EOA has to pay for gas fees.

In the latter case, beneficiary users can just call a method to receive tokens and they can pay for gas fees which is more realistic to me. For example,

contract IncentiveContract {

    function claimIncentives(uint256 tokens) public {
        if (condition) {
            MyToken instance = MyToken('address of MyToken');
            instance.transfer('beneficiary address', tokens); 

If my approach for the latter case is correct, should the ERC20 token owner address send all of his tokens to contract address so the contract can manage all these?

  • Yes, tokens must be transferred on the contract itself. Alternatively you can do approve() against the contract from a multisig wallet or similar that holds the tokens securely. – Mikko Ohtamaa Apr 19 '20 at 20:16
  • @MikkoOhtamaa Thanks. Please take a look at this post – bbusdriver Apr 20 '20 at 6:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.