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 withdrawl queue #160

Merged
merged 58 commits into from
Aug 26, 2024
Merged

Feat withdrawl queue #160

merged 58 commits into from
Aug 26, 2024

Conversation

0xDegenDeveloper
Copy link
Collaborator

@0xDegenDeveloper 0xDegenDeveloper commented Aug 12, 2024

  • Added queue_withdrawal() & collect_queued_liquidity() entry points
  • Added Vault::Event::WithdrawalQueued & Vault::Event::QueuedLiquidityCollected
  • Added get_lp_queued_balance(liquidity_provider) & get_total_queued_balance(round_id)
    • get_lp_queued_balance(), get_lp_stashed_balance() & get_total_stashed_balance()
  • Added ~20 tests for queues/stash collection
  • Vault::get_current_option_round_id() became Vault::get_current_round_id()
  • Vault::get_option_round_address() became Vault::get_round_address()
  • OptionRound::get_refundable_bids_for() became OptionRound::get_refundable_balance_for(). OptionRound::get_tokenizable_options_for() became OptionRound::get_mintable_options_for(). OptionRound::tokenize_options() became OptionRound::mint_options(). OptionRound::Event::OptionsTokenized became OptionRound::Event::OptionsMinted
  • Vault::get_unsold_liquidity(round_id) became OptionRound::unsold_liquidity()
  • Condensed/simplified/reduced logic

started some prelim tests
- withdraw_stashed_liquidity -> claim_queued_liquidity

- lp_stashes: (bool, u256) -> u256
added amount so that the user can select the portion they want stashed once the round settles, and can overwrite if they want to update this value
- re-order functions in impl

- updated queueing to take in the an amount param

- re-defined/re-factored internal helper functions

- simplified external functions
0xDegenDeveloper and others added 26 commits August 13, 2024 11:53
- assert if a == b +- range
rm divide with precision

rm old comments

re order logic
get_lp_queued_balance & get_total_queued_balance now accept round_ids
for withdraw_queued & claim_queued_liquidity
reserve price, cap level, & volatility are now stored by round instead of time range

TWAP is still time range
refined logic for setting default values for mock market aggregator

created function to deploy vault facades with a custom VaultType
- update connection to mk agg
- broke apart deploying first round vs next round (for now)
Copy link
Collaborator Author

@0xDegenDeveloper 0xDegenDeveloper left a comment

Choose a reason for hiding this comment

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

Checked

@0xDegenDeveloper 0xDegenDeveloper merged commit c9a8798 into develop Aug 26, 2024
2 checks passed
@0xDegenDeveloper 0xDegenDeveloper deleted the feat-withdrawl-queue branch August 26, 2024 19:58
@0xDegenDeveloper 0xDegenDeveloper restored the feat-withdrawl-queue branch August 26, 2024 20:09
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.

2 participants