I have been using yield Farming (YFValue) and I noticed when I accept the contract via MetaMask.

I set faming 500 USDT but in the contract the input was:

Function: approve(address _spender, uint256 _value)

MethodID: 0x095ea7b3
[0]:  000000000000000000000000c2d55ce14a8e04aef9b6bcfd105079b63c6a0ac8
[1]:  000000000000000000000000000000000000314dc6448d932ae0a456589c0000

when I decode it via Etherscan it said:

    _value  uint256 999999999999999000000000000000000

My question is: does this mean that _spender can take more the 500 USDT? If not can he repeatedly take 500 USDT every time and how to cancel it? thank you in advance

The transaction is as follows: https://etherscan.io/tx/0xa10306c12bbb1a3e9c81936879ef919105c4e38262da483943eb9026347e2f75

  • 1
    "how to cancel it?" - simply call approve(0). – goodvibration Sep 2 '20 at 19:32

Yes, technically the _spender can take up to 999999999999999000000000000000000 of your tokens. Unfortunately, this is common practice, as it makes token transactions of this nature more user-friendly.

For example, once you have called approve() with this amount, you can now make many transactions without having to call approve() again, which technically means you need to make less transactions and will cost you less.

In order to cancel it, simply call the approve() function again and set it back to 0:

approve(0xC2D55CE14a8e04AEF9B6bCfD105079b63C6a0AC8, 0)

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.