Skip to content

Use withdraw logic for ERC20#11

Open
3esmit wants to merge 1 commit intomasterfrom
erc20-withdraw
Open

Use withdraw logic for ERC20#11
3esmit wants to merge 1 commit intomasterfrom
erc20-withdraw

Conversation

@3esmit
Copy link
Copy Markdown

@3esmit 3esmit commented Feb 3, 2020

No description provided.

@bitgamma
Copy link
Copy Markdown
Contributor

bitgamma commented Feb 6, 2020

what is the advantage of using withdraw logic for ERC20 tokens? Is the reentrance problem applicable to non-payable functions?

Also, in that case wouldn't it be better to use the approve mechanisms and then have the merchant use transferFrom instead? This way we would at least avoid to duplicate the data already held by the ERC20 contract itself (thus we wouldn't have two sources of truth)

@3esmit
Copy link
Copy Markdown
Author

3esmit commented Feb 11, 2020

We could use approval mechanism and lock the tokens based on how much is approved, but I dont see any technical difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants