I am reading this article : https://medium.com/@jgm.orinoco/why-use-the-withdrawal-pattern-d5255921ca2a
It seems interesting. Could anyone explain the idea of the Withdrawal pattern in a simple way ?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI am reading this article : https://medium.com/@jgm.orinoco/why-use-the-withdrawal-pattern-d5255921ca2a
It seems interesting. Could anyone explain the idea of the Withdrawal pattern in a simple way ?
The withdrawal pattern places the responsibility for claiming funds, on the recipient of the funds: the recipient has to send a transaction to withdraw and obtain their funds.
This can simplify a smart contract that is sending funds to recipients, because the contract does not have to handle the cases of what to do if sending the funds fail. A smart contract does not know whether sending the funds failed due to an actual error, or whether the recipient is a malicious smart contract that deliberately refuses to accept the funds.