Exam CBSA All QuestionsBrowse all questions from this exam
Question 14

When writing and considering push and pull in a smart contract that involves "user" funds would it be better to ____________________?

    Correct Answer: B

    Withdraw funds rather than push funds to them automatically. In smart contracts involving user funds, favoring pull over push mechanisms for external calls is a prudent approach. External calls can fail for various reasons, and isolating each external call into its own transaction that the recipient initiates can minimize potential damage. This strategy is particularly relevant for payments, where allowing users to withdraw funds voluntarily rather than pushing funds to them can reduce issues such as external errors and gas limits.

Discussion
KriscOption: C

As far as I can see, B and C are the same. Pull should be the same as withdraw? Indeed pull is a more generic term, as the principle applies to more than just currency. Indeed, the title of the paragraph in the reference is "Favor pull over push for external calls"