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

feat: Add delayed redemptions #184

Closed
wants to merge 4 commits into from
Closed

feat: Add delayed redemptions #184

wants to merge 4 commits into from

Conversation

bingen
Copy link
Collaborator

@bingen bingen commented May 26, 2024

Closes #29

@bingen bingen self-assigned this May 26, 2024
@bingen bingen force-pushed the delayed_redemptions branch from be77d1f to 7d50dde Compare May 27, 2024 09:10
@bingen bingen force-pushed the delayed_redemptions branch from 2658c96 to 452ee45 Compare May 28, 2024 16:14
@bingen bingen marked this pull request as ready for review May 28, 2024 16:42
boldToken.transfer(msg.sender, redemptionRefund);

// Send penalty to yield router
boldToken.transfer(interestRouterAddress, penalty);
Copy link
Collaborator

@danielattilasimon danielattilasimon May 31, 2024

Choose a reason for hiding this comment

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

Dunno what the final plans are, but currently, the ActivePools themselves split their yield 72:28 between the corresponding SPs & the global interestRouter. Are we intentionally leaving out the SPs here, e.g. for simplicity or because it's ambiguous who should get how much?

_calcRedemptionRate(_getUpdatedBaseRateFromRedemption(_boldAmount, totals.boldSupplyAtStart));
require(redemptionRate <= _maxFeePercentage, "CR: Fee exceeded provided maximum");
uint256 redemptionRate = _calcRedemptionRate(
_getUpdatedBaseRateFromRedemption(redemptionCommitment.boldAmount, totals.boldSupplyAtStart)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The whitepaper declares that:

The resulting fee f(t_j) = f_min + b(t_j) for a redeemer gets fixed upon commitment and is applied to the redeemed amount when the redemption is confirmed (see above).

Also see @cvalkan's comment in relevant Slack thread:

My mental model is that from the redeemer's perspective, the system state (relevant for the fee calculation) is frozen at commitment time, while for everybody else (i.e. subsequent redeemers) it continues to evolve normally.

I not sure if it necessarily has to work like that, just wanted to point out that we're deviating from the WP. If we decide not to implement it as described, then we should update the WP.

@bingen
Copy link
Collaborator Author

bingen commented May 31, 2024

After some discussion during dev call and on Slack, we are not doing this for now. We may reopen it after the oracle decision (specially if we go for the composite solution).

@bingen bingen closed this May 31, 2024
This was referenced Jun 1, 2024
bingen added a commit that referenced this pull request Jun 11, 2024
bingen added a commit that referenced this pull request Jun 12, 2024
@danielattilasimon danielattilasimon deleted the delayed_redemptions branch January 19, 2025 04:31
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.

Delayed redemptions
2 participants