0

My dapp pays users fees based on some events.

Is it best practice to send fees directly to user wallet at time of event? (This means the user paying for interaction would pay to transfer the Eth I suppose?) Or to keep a balance and let them withdraw at once? (This means adding a uint 'balance' to my struct for each user)

Opensea groups royalty payments and sends as separate transactions -- assuming this is to keep gas fees lower on sales?

What is best practice?

1 Answer 1

1

the design decision usually depends upon the quantity and frequency of payments, however pull-payments are often considered the best practice when it comes to sending Ether, security-wise. It prevents recipients from blocking execution, and eliminates reentrancy concerns.

to better understand why see solidity-patterns

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.