dfinity / ICRC-1

A fungible token standard developed by the Ledger & Tokenization working group for the IC.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Insecure `approve` method

niftyorca opened this issue · comments

In the approve branch, the approve function should not overwrite the allowance, but rather increment/decrement it. In the overwriting scenario, exploits are possible by frontrunning the new approval update tx.

Reference
https://swcregistry.io/docs/SWC-114

Hey @niftyorca , the approve function won't be part of the ICRC-1 standard and we decided to move the discussion to an extension of the standard. I'll close this for now.