IHederaTokenService.sol - custom fee schedule detector #1271
littletarzan
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I propose adding a Hedera Smart Contract Service (HSCS) system contract function that allows a smart contract to determine whether a Hedera Token Service (HTS) token contains a
customFeeSchedule
and/or a non-emptycustomFeeScheduleKey
. This information is important for some smart contracts to safely interact with tokens without risk of unintended token transfers caused by malicious fee schedules.For a simple example, suppose any externally owned account (EOA) could associate tokens to a smart contract, and that smart contract is meant to have a balance of valuable tokens. A malicious fee schedule token could be associated and transferred to that contract. If, through normal operation, users could transfer tokens out of the smart contract, the malicious fee schedule token could be transferred as well as the balances of valuable tokens along with it, directly to an account they do not belong.
A possible
IHederaTokenService.sol
implementation to mitigate this could beBeta Was this translation helpful? Give feedback.
All reactions