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

Add wrapper bundler #309

Closed
wants to merge 22 commits into from
Closed

Add wrapper bundler #309

wants to merge 22 commits into from

Conversation

MerlinEgalite
Copy link
Contributor

Fixes #292

@MerlinEgalite MerlinEgalite requested review from a team, Rubilmax and Jean-Grimal and removed request for a team October 22, 2023 06:52
Copy link
Collaborator

@Rubilmax Rubilmax left a comment

Choose a reason for hiding this comment

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

On a general note, I think it'd be clearer to have a draft implementation
You talked about a repository, is it existing?

Do we have a clear usecase described as follows:

  • I am an EOA, I want to bundle deposits/withdrawals through the bundler
  • Do I want to deposit on behalf of another protocol/EOA?
  • Should I transfer anything to the bundler? To somewhere else?
  • Who is authorized to do what on the permission wrapper?

src/ERC20WrapperBundler.sol Outdated Show resolved Hide resolved
src/ERC20WrapperBundler.sol Outdated Show resolved Hide resolved
src/ERC20WrapperBundler.sol Outdated Show resolved Hide resolved
@MerlinEgalite
Copy link
Contributor Author

On a general note, I think it'd be clearer to have a draft implementation You talked about a repository, is it existing?

I'll try to setup the repo this week but it's not my prio yet.

Do we have a clear usecase described as follows:

  • I am an EOA, I want to bundle deposits/withdrawals through the bundler
  • Do I want to deposit on behalf of another protocol/EOA?
  • Should I transfer anything to the bundler? To somewhere else?
  • Who is authorized to do what on the permission wrapper?

Let's say I'm an EOA:

  1. Deposit not permissionless tokens to the bundler
  2. Wrap those tokens to the permissioned token (the bundler is whitelisted in the permissioned token)
  3. Supply those tokens as collateral on Blue (blue is whitelisted in the permissioned token)

That makes me think that there's a pb at step 2 in this PR I think
🤔

@MerlinEgalite MerlinEgalite linked an issue Oct 23, 2023 that may be closed by this pull request
@Rubilmax
Copy link
Collaborator

The rationale for this user would be: I prefer to interact with permissioned tokens to avoid touching securities right?

@MerlinEgalite
Copy link
Contributor Author

MerlinEgalite commented Oct 23, 2023

The rationale for this user would be: I prefer to interact with permissioned tokens to avoid touching securities right?

It's for these reasons for example

EDIT: the link was missing sorry

Copy link
Collaborator

@Rubilmax Rubilmax left a comment

Choose a reason for hiding this comment

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

I overall feel like OZ's ERC20Wrapper is poorly maintained and not standardized so I'd instead advocate to define our own (including the feature to withdraw on behalf of someone else, provided you are given enough allowance)

Obviously there are features that are not possible for regulatory reasons but I think this workshop deserves a design call. Can we plan one?

src/ERC20WrapperBundler.sol Show resolved Hide resolved
@MerlinEgalite
Copy link
Contributor Author

I overall feel like OZ's ERC20Wrapper is poorly maintained

What leads you to say that?

Overall agree with the rest. I think it's quite easy to adapt the code to our needs

@MerlinEgalite MerlinEgalite changed the base branch from review-cantina to fix/prevent-reentrancy November 8, 2023 09:11
@MerlinEgalite MerlinEgalite marked this pull request as ready for review November 8, 2023 09:16
Copy link

Add wrapper bundler

Generated at commit: f77392b52abe2f9f1262e979890385c54f806bc6

🚨 Vulnerabilities Summary

Process Issues Results
Contract Inspector note
low
critical
Total
20
10
1
31
Dependency Checker Total 0

For more details view the full report in OpenZeppelin Code

Copy link
Collaborator

@Rubilmax Rubilmax left a comment

Choose a reason for hiding this comment

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

Seems correct but I need to review it with underlying PRs merged to make sure we're not missing a change

Base automatically changed from fix/prevent-reentrancy to review-cantina November 8, 2023 14:49
@MerlinEgalite MerlinEgalite deleted the branch review-cantina November 8, 2023 18:18
@MerlinEgalite MerlinEgalite mentioned this pull request Nov 8, 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.

Add Wrappers
3 participants