-
Notifications
You must be signed in to change notification settings - Fork 0
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
DTF Strategy #47
DTF Strategy #47
Conversation
Before the strategy's token account was generated from keyPair account. Tested on devnet.
… as invested amount
- amount_withdrawn - asset_price - a_to_b_for_purchase
-LUT is a must since the swap iteration requires a lot of accounts.
-Default CU would fail in the second iteration of swap
asset_price & asset_value & current_weight
…n pre assigned weight
-assetValue correctly calculated for both WSOL and TMAC
…n invest_tracker.current_weight -after dividing the amount per swap for each asset, if there is any difference between the requested amount for withdrawal and the sum of amount_per_swap, the asset with the highest current_weight would be have the difference in amount to ensure the swap happens as much as amount from free_fund arg.
…for orca flow of process-report -to keep it up to date with the dev branch
# Conflicts: # programs/tokenized_vault/src/utils/strategy.rs # tests/integration/vault.ts
-in AMM context, having assetValue of 100, doesn't mean that we can get back 100 from selling all the assets, therefore leave 30 bps of buffer to the assetValue for smooth withdrawing of underlying assets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any criticals. Need to do 4 things:
- prepare an accurate scope for the next build
- appropriately log TODOs
- release this build as the pre-alpha
- measure costs
pub a_to_b_for_purchase: bool, | ||
pub assigned_weight: u16, | ||
pub current_weight: u16, | ||
//later add last_updated_timestamp so that the actions happen when the price is fresh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Transform these comments into TODOs, so they won't get lost
The merge-base changed after approval.
The merge-base changed after approval.
Haves:
-Buy assets proportionally as pre-assigned weight: strict restriction so that all the assets in the portfolio needs to be bought
-Sell assets in the similar way(would sell slightly more from the more valued assets): kept not as strict as buying to test rebalancing.
-Rebalanced as pre-assigned weight
-total_assets discount buffer
-total_assets calculation based on portfolio’s asset values (asset price * asset amount) -updating of each asset Value based on AMM’s sqrt_price
-Vault.direct_deposit->buy assets
-Vault.redeem ->sell assets
Don’t haves:
Changing assigned weight to each asset - need to work on it
Adding or removing asset from the portfolio - need to work on it
Customizing slippage limit - it’s a topic of a discussion. At the moment, swapping on Orca is set in a way that any result would be accepted.