-
Notifications
You must be signed in to change notification settings - Fork 1
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
withdraw assets without share conversion #115
Conversation
WalkthroughThe pull request introduces modifications to the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)src/Strategy.sol (1)
You're now passing the “amount” in terms of the underlying asset units, which correctly aligns with the IERC4626 “withdraw(uint256 assets, address receiver, address owner)” signature. If there's existing logic elsewhere that computes or stores shares for withdrawals, verify that it has been fully updated to use the underlying asset-based parameter. Here's a script to search for other references to “withdraw” calls in the codebase to confirm they're all consistently using underlying asset amounts: ✅ Verification successfulLet me search for more context about the withdraw implementation and usage to ensure consistency. Let me check the interface definition and other related code to understand the withdraw implementation better. Let me check the actual implementation of the Strategy contract to understand the withdrawal logic better. Based on the gathered evidence, I can now provide the final response: Withdrawal implementation is consistent with IERC4626 The codebase shows consistent handling of withdrawals in terms of underlying assets:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# This script searches for references to `withdraw(` in the codebase
rg -A 3 "withdraw\s*\("
Length of output: 1470 Script: #!/bin/bash
# Search for withdraw function definitions and implementations
ast-grep --pattern 'function withdraw($$$) $$$'
# Search for YEARN_VAULT definition and type
rg -B 2 -A 2 "YEARN_VAULT\s*="
Length of output: 444 Script: #!/bin/bash
# Search for IERC4626 interface definition
rg -A 10 "interface IERC4626"
# Search for BaseStrategy implementation
ast-grep --pattern 'contract BaseStrategy $$$'
# Look for any maxWithdraw or previewWithdraw functions
rg -A 3 "maxWithdraw|previewWithdraw"
Length of output: 518 Script: #!/bin/bash
# Get the Strategy contract implementation focusing on withdraw-related code
rg -B 5 -A 10 "function withdraw" src/Strategy.sol
# Check if there are any share calculations or conversions
rg -A 3 "shares|convertTo" src/Strategy.sol
Length of output: 399 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #115 +/- ##
=======================================
Coverage 89.23% 89.23%
=======================================
Files 5 5
Lines 604 604
Branches 90 90
=======================================
Hits 539 539
Misses 54 54
Partials 11 11 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary by CodeRabbit
New Features
Bug Fixes
Refactor