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

Skip transfer if leaving rewards in prize pool #107

Conversation

trmid
Copy link
Member

@trmid trmid commented Apr 5, 2024

Use case:

  • DrawManager is allocating the rest of the reserve to itself and wants to contribute it on behalf of a vault
  • DrawManager "withdraws" the rewards, but sets the recipient as the prize pool, so no ERC20 token transfer needs to take place and the tokens stay where they are after the accounting updates.

@trmid trmid requested a review from asselstine April 5, 2024 21:39
Copy link

linear bot commented Apr 5, 2024

Copy link

github-actions bot commented Apr 5, 2024

LCOV of commit 8b86ed1 during Tests with 100% Coverage #494

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

Files changed coverage rate:
                                             |Lines       |Functions  |Branches    
  Filename                                   |Rate     Num|Rate    Num|Rate     Num
  =================================================================================
  src/PrizePool.sol                          | 100%    188| 100%    36|    -      0

@asselstine asselstine merged commit cd56c97 into main Apr 8, 2024
2 checks passed
@trmid trmid deleted the gen-1262-skip-token-transfer-if-withdrawrewards-recipient-is-prize branch April 17, 2024 18:31
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