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

Update ILiquidationSource implementation #3

Merged

Conversation

trmid
Copy link
Member

@trmid trmid commented Aug 23, 2023

Note

_flashSwapData was added to the liquidate function in the interface, but this contract does not support flash swaps so an error will be thrown if that data is not empty.

@linear
Copy link

linear bot commented Aug 23, 2023

@github-actions
Copy link

LCOV of commit 3df84a2 during 100% Test Coverage #16

Summary coverage rate:
  lines......: 100.0% (52 of 52 lines)
  functions..: 100.0% (11 of 11 functions)
  branches...: no data found

Files changed coverage rate:
                             |Lines       |Functions  |Branches    
  Filename                   |Rate     Num|Rate    Num|Rate     Num
  =================================================================
  src/VaultBooster.sol       | 100%     49| 100%    10|    -      0

amountAvailable = (amountAvailable - amountOut);
_boosts[IERC20(tokenOut)].available = amountAvailable.toUint144();
_boosts[IERC20(tokenOut)].lastAccruedAt = uint48(block.timestamp);
prizePool.contributePrizeTokens(vault, amountIn);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add flash swap support here; needs a couple of things tho:

  • safe transfer needs to occur first
  • then if data.length > 0 you cast and call the receiver
  • then contribute to the prize pool

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

LCOV of commit 629f0d8 during 100% Test Coverage #33

Summary coverage rate:
  lines......: 100.0% (57 of 57 lines)
  functions..: 100.0% (11 of 11 functions)
  branches...: no data found

Files changed coverage rate:
                             |Lines       |Functions  |Branches    
  Filename                   |Rate     Num|Rate    Num|Rate     Num
  =================================================================
  src/VaultBooster.sol       | 100%     54| 100%    10|    -      0

@trmid trmid requested a review from asselstine August 27, 2023 18:12
@asselstine asselstine merged commit d16802b into main Aug 27, 2023
2 checks passed
@asselstine asselstine deleted the gen-498-vaultbooster-using-out-of-date-liquidator-interfaces branch August 27, 2023 21:11
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