Skip to content

feat: locked yvUSD cooldown strategy and pending redemptions refactor - #1

Open
johnnyonline wants to merge 12 commits into
masterfrom
locked-yvusd-strategy
Open

johnnyonline wants to merge 12 commits into
masterfrom
locked-yvusd-strategy

Conversation

@johnnyonline

@johnnyonline johnnyonline commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Towards locked yvUSD market. Market oracle PR @ flexmeow/flex-contracts#24

@ctmotox2

ctmotox2 commented Sep 8, 2026

Copy link
Copy Markdown

I was initially concerned that receiving the collateral and starting its cooldown in separate transactions could leave the accounting inconsistent between calls like an additional call may disrupt the accounting. Discussed with @johnnyonline , and both calls are executed atomically through the multisig, so this is not an issue. LGTM

@johnnyonline johnnyonline changed the title feat: locked yvUSD cooldown strategy feat: locked yvUSD cooldown strategy and pending redemptions refactor Sep 8, 2026
@johnnyonline

Copy link
Copy Markdown
Member Author

I was initially concerned that receiving the collateral and starting its cooldown in separate transactions could leave the accounting inconsistent between calls like an additional call may disrupt the accounting. Discussed with @johnnyonline , and both calls are executed atomically through the multisig, so this is not an issue. LGTM

Fixed that as well as Schlag's comment about pendingRedemptions may become outdated here

Comment thread src/integrations/FxSaveStrategy.sol Outdated
Comment on lines +84 to +85
uint256 _baseAssets = COLLATERAL.convertToAssets(COLLATERAL.balanceOf(address(this))) + queuedBaseAssets;
if (_baseAssets > 0) _pending += _baseAssets * FXBASE.nav() / _NAV_TO_ASSET_SCALE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

queued assets are still earning yield ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Should be. It only stops earning the gauge rewards fxSAVE compounds

Comment on lines +83 to +84
uint256 _shares = COLLATERAL.maxRedeem(address(this));
require(_shares > 0, "!claim");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we really need this? Seems unnecessary

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Guess not. Removed here

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.

3 participants