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

[Credix] Update to 0.9.1 #57

Merged
merged 2 commits into from
Sep 20, 2023
Merged

Conversation

crypto-vincent
Copy link
Contributor

@crypto-vincent crypto-vincent commented Sep 15, 2023

TLDR Summary:

Screenshot 2023-09-15 at 12 49 33 PM

PR Combo:

[UXD] Changes updates recap:

  • A) We update the usage of credix_treasury -> credix_treasury_pool
  • B) We update the usage of credix_multisig -> credix_treasury
  • C) We make sure to not mistake treasury_pool with credix_treasury which are now 2 completely different things
  • D) We remove the usage of withdraw_request
  • E) We use the new calculation function to compute the withdrawable amount during credix redeem
  • F) We update the tests to work with latest version

[CREDIX] Change Log:

Breaking:

  • feat: credix pass now has flags instead of boolean fields in the struct. All the fields are exposed by functions.
  • feat: withdraw epochs now do the rebalancing, the redeem base locked for investor calculation now take request amount and lp owned both into account. (withdraw request account was removed from contexts)
  • feat: Repayment schedule's periods now have calculation date. Describing on what date the accrual will be calculated from.
    feat: Membership fee calculations are not based on the yearly outstanding principal
  • feat: Program State now has credix treasury. Credix treasury is where the credix fees will be collected from now on.

For Integrators:

Required changes for integrators in there smart contract:

  • If any field example(is_active, is_investor) from the credix pass is used. Replace it with (is_active(), is_investor()...)

  • Remove withdraw Request accounts from the cpi calls.

  • Mark withdraw epoch mutable if it is already not when creating withdraw request or redeeming withdraw requests.

  • For Redeem withdraw request and withdraw funds. Change the credix_muiltisig -> credix_treasury. And Credix_muiltisig_token_account-> credix_treasury_token_account. The correct credix_treasury address is in program_state account of credix program.

  • To get the max amounts that can be withdrawn in the withdraw Epoch. We have provided a function in the rust client.

Changes required for there local setup:

  • When sending the repayment schedule with set_repayment_schedule we can directly send the RepaymentPeriod instead of RepaymentPeriodsInput struct which previously existed. The calculation_date in the periods can be set equal to the period's time_frame.start.

@crypto-vincent crypto-vincent self-assigned this Sep 15, 2023
@crypto-vincent crypto-vincent changed the title [WIP] [Credix] Update to 0.9.1 [Credix] Update to 0.9.1 Sep 15, 2023
@crypto-vincent crypto-vincent merged commit ed41975 into main Sep 20, 2023
1 check passed
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.

1 participant