Assessment reports>Token Paymaster>Threat Models>getTokenValueOfOneNativeToken

Function: getTokenValueOfOneNativeToken(address token)

This function is used to get the value of one native token in terms of the given token.

Inputs

  • token

    • Control: Fully controlled by user.

    • Constraints: Should be a valid ERC20 token address.

    • Impact: This is the token for which the price is to be queried.

Branches and code coverage (including function calls)

Intended branches

  • Check price result of a single token.

Negative behavior

  • Tokens with zero tokenPriceUnadjusted cause revert.

Zellic © 2024Back to top ↑