Closed Byron-McKeeby closed 4 years ago
For redeemMaximum
should we instead query the market for available cash and then redeem exactly that amount? That behavior would not redeem all crWETH (there is no situation in which we can guarantee total redemption). But it would redeem the maximum amount of crWETH, which feels like the best behavior
This seems like a reasonable solution. Can you please add this?
This seems like a reasonable solution. Can you please add this?
Added
Thank you for the fix. We have created a test for the strategy on mainnet fork, and it works well. The same check is needed in
redeemMaximum()
as well, for the corner case when the execution path goes through thewithdrawAllToVault(...)
. Can you please cover this case too?