Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transferFrom includes non-standard infinite allowances #4

Open
mgcolburn opened this issue Apr 23, 2020 · 0 comments
Open

transferFrom includes non-standard infinite allowances #4

mgcolburn opened this issue Apr 23, 2020 · 0 comments

Comments

@mgcolburn
Copy link

transferFrom includes non-standard infinite allowances

Severity: Informational
Difficulty: Low
Type: Undefined Behavior
Target: OrbitDai.sol

Description

The transferFrom function used for the oDai and eDai tokens, mimicking the token implementation of Dai itself, has a special case in the allowance check such that if a user's allowance is set to 2^256-1 (the max unsigned integer), the allowance is considered to be infinite and never decreases unless modified explicitly by the allower. Though this behavior does not introduce security concerns we are aware of, it diverges from the expected ERC20 behavior and it should be documented explicitly so that users are aware of it and do not accidentally trigger this behavior.

Recommendations

Short term, outline the infinite allowance behavior in the project README.

Long term, always document any deviations from a specification to help facilitate compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant