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

Alternative to zero ltv transfer fix #836

Closed
wants to merge 30 commits into from

Conversation

miguelmtzinf
Copy link
Contributor

Alternative approach of PR #820
Instead of passing the addressProvider address, it's being fetch via calls from the AToken contract.

Downside: We trust on AToken having a POOL function, and Pool having a ADDRESSES_PROVIDER function
Benefit: mainly gas costs

PR#820
ERC20 transfer 88735 202116 122424 53
ERC20 transferFrom 91657 149936 117393 11
FlashloanAttacker supplyAsset - - 219573 1
MockL2Pool deposit 145333 229847 198618 414
MockL2Pool liquidationCall 281556 469611 383683 44
MockL2Pool liquidationCall 338764 377066 357915 2
MockL2Pool mintUnbacked 164387 220833 183273 16
MockL2Pool supply 145324 251971 195057 247
MockL2Pool supply - - 221415 2
MockL2Pool supplyWithPermit 222379 255348 238864 6
MockL2Pool supplyWithPermit - - 223410 2
Alternative:
ERC20 transfer 88520 202007 122310 53
ERC20 transferFrom 91442 149827 117216 11
FlashloanAttacker supplyAsset - - 219427 1
MockL2Pool deposit 145187 229701 198472 414
MockL2Pool liquidationCall 281309 469364 383565 44
MockL2Pool liquidationCall 338620 376819 357720 2
MockL2Pool mintUnbacked 164268 220723 183620 16
MockL2Pool supply 145178 254284 195021 247
MockL2Pool supply - - 221269 2
MockL2Pool supplyWithPermit 222233 255202 238718 6
MockL2Pool supplyWithPermit - - 223264 2

sakulstra and others added 29 commits February 27, 2023 16:43
Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
@miguelmtzinf miguelmtzinf requested a review from The-3D as a code owner March 22, 2023 16:23
@height
Copy link

height bot commented Mar 22, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@miguelmtzinf
Copy link
Contributor Author

These changes are now part of #820

@miguelmtzinf miguelmtzinf deleted the fix/zero-ltv-transfer-alternative branch March 23, 2023 11:05
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

Successfully merging this pull request may close these issues.

2 participants