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

Alternative to CCIP22: Two Phase Redemption #74

Open
KILRdad opened this issue Jun 17, 2024 · 0 comments
Open

Alternative to CCIP22: Two Phase Redemption #74

KILRdad opened this issue Jun 17, 2024 · 0 comments

Comments

@KILRdad
Copy link

KILRdad commented Jun 17, 2024

Decision to end protocol started March 2024. At this time question was raised on Discord what would happen to unclaimed STX since 100% STX treasuries have been stacked with only approx 45% MIA and 62% NYC stacked and include this in CCIP22

Did not happen, now proposing to either add additional CCIP or replacement CCIP if 22 fails that would split redemptions into 2 phases/epochs. 1st phase redemption would last 6 months (25,000 blocks).

In the 2nd/final epoch the redemption ratio for any NYC to be burned would need to be recalculated based off the current supply of unclaimed STX

The newly calculated ratio will apply to all NYC to be redeemed in the 2nd phase going forward, will also allow all NYC redeemed in phase 1 to claim 1x more in phase 2 with the new ratio.

Potential workflow of additional round liquidation:

Phase 1
15,519,437 NYC STX
5.332 Billion NYC
Redemption Ratio .00291

NYC Holder 10 million redeems 29,106 STX

1st round redemption only 62% STX redeemed leaving 5,897,386 STX in treasury

Phase 2
5,897,386 STX
5.332 Billion NYC (allows all burns from phase 1 to claim again)
Redemption Ratio .0011

NYC Holder 10 million who redeemed in phase 1 can do 1 final redemption with the previously burned 10 million NYC: 11,060 stx

This will encourage all users to redeem early and reduce potential for unclaimed STX.

Proposed changes to CCIP22 language in bold

Redemption Extensions
This CCIP will implement a new redemption extension for NYC.

The redemption extensions will:
receive and hold funds from the respective city treasury contract
allow for 2 phases of redemption
record the total supply of NYC at the time of initialization
calculate the ratio of NYC to STX based on the total supply and contract balance for phase 1
allow users to burn NYC in exchange for their portion of STX and track the related totals from phase 1 to use in phase 2
calculate new redemption ratio in phase 2 (25K blocks after phase 1 initiated)

Redemption Mechanism
The NYC mining treasury currently holds 15.5M STX, and upon successful execution the entire balance will be transferred to the redemption extension.

Following the transfer and upon initialization, the redemption extension will:
get the total supply for NYC V1 and V2
add the total supplies accounting for decimal differences
get the balance of the redemption contract itself
set variables representing all data gathered above and that redemption is enabled
create a redemption ratio from balance / total supply

The redemption extension then exposes a public function that:
calculates amount to transfer based on balance * redemption ratio
verify that redemption is enabled
verify user hasn't claimed already
verify there is something to burn
verify there is something to redeem
burn the NYC balance for the user
transfer the STX to the user
store redemption info for the user
print the redemption info as 2 events
stored redemption info from phase 1 will be used for 1 more redemption at the new ratio in phase 2
redemption ratio will be recalculated in phase 2: remaining treasury stx / total NYC supply

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

No branches or pull requests

1 participant