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

fix: zero ltv transfer #820

Merged
merged 31 commits into from
Mar 23, 2023
Merged

Conversation

sakulstra
Copy link
Collaborator

@sakulstra sakulstra commented Mar 6, 2023

  • fix: disallow enabling 0ltv asset as collateral
    • currently it is possible to enable collateral for a 0 ltv asset, which seems intended as 0ltv is mostly used for mitigation when a asset depegs to no longer allow borrows. By allowing to enable collateral, potentially a user could "up" his position with a 0ltv asset to force liquidators to liquidate 0ltv.
  • fix: don't automatically activate collateral for assets received in isolation
    • currently when receiving an isolated asset (via supply or transfer) it would be automatically enabled as collateral, which seems unintended
  • feat: add new ISOLATED_COLLATERAL_SUPPLIER role
    • in order to allow supply as collateral for certain contracts (e.g. migration tool) a new role is added, allowing supplies and transfers with the old behavior.

@height
Copy link

height bot commented Mar 6, 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.

sakulstra added a commit to bgd-labs/aave-v3-core that referenced this pull request Mar 7, 2023
@miguelmtzinf
Copy link
Contributor

This PR looks good to me. The only thing that I do not like is the need of passing the addressesProvider, which increases gas costs. I realized we can skip that by fetching the address from the AToken. Think it's worth to evaluate that option @sakulstra
(created PR #836 with the code, couldn't PR to your branch directly)

@miguelmtzinf miguelmtzinf merged commit ea48670 into aave:feat/3.0.2 Mar 23, 2023
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.

3 participants