0

is there some possibility to charge a comission fee on each transaction done on an specific smart contract?

For instance, User A swaps 1 ETH by 100k EXAMPLE. At the end of the transaction, User A will receive only 99k EXAMPLE, and the remaining 1k is automatically transferred to User B (like a central account).

Just reinforcing - this doesn't have anything related to gas fee! Is a comission fee on top of the gas fee user needs to pay anyway.

Thanks!

1

This happens all the time.

Contracts can be thought of as defining the relationship between what goes in and what comes out. There is no prohibition on applying some math such as extracting a fee such that what comes out is slightly less than what goes in.

Hope it helps.

Your Answer

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

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