Skip to content

Add ERC4626 Async Vaults #5710

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ernestognw
Copy link
Member

@ernestognw ernestognw commented Jun 3, 2025

Fixes #4761

This PR adds two extensions for time-delayed ERC4626 operations:

ERC4626AsyncDeposit

  • Queue assets with queueDeposit(), claim shares with standard deposit()
  • Linear release over configurable delay (default: 1 day)
  • Protects against economic attacks and controls capital inflows

ERC4626AsyncWithdraw

  • Queue shares with queueRedeem(), claim assets with standard redeem()
  • Linear release over configurable delay (default: 1 day)
  • Prevents bank runs and controls capital outflows

Key Features

  • ERC4626 Compatible: No function conflicts, uses existing claim methods
  • Liquid: Gradual release allows partial claims over time
  • Fair: Weighted average timestamps for multiple operations
  • Priced at Execution: Exchange rates calculated when claiming
  • Simple: Minimal complexity compared to ERC-7540

Essential for RWA protocols, liquid staking, and controlled capital flows.

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

Copy link

changeset-bot bot commented Jun 3, 2025

⚠️ No Changeset found

Latest commit: f4669cd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ernestognw ernestognw mentioned this pull request Jun 3, 2025
@ernestognw ernestognw added this to the 5.x milestone Jun 4, 2025
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.

Implement ERC-7540
1 participant