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

able to increase position #22

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

hjchan
Copy link

@hjchan hjchan commented Mar 5, 2023

#15
@askibin Created a draft PR based on this issue. I am thinking of combining add collateral and increase position in 1 endpoint because the user might need to add collateral when the user increases position. Although it can be done in bundling the instructions, it will always require adding collateral to be the first instruction to prevent check_leverage failure.

Let me know any comments about this approach, will update decrease position if everything is alright. Thanks

@mabrehan
Copy link

mabrehan commented Mar 7, 2023

Whenever a position is being updated, we are charging borrow_fee. Instead can we update that in unrealized_loss and charge it at the time of closing the position.

@hjchan
Copy link
Author

hjchan commented Mar 8, 2023

Whenever a position is being updated, we are charging borrow_fee. Instead can we update that in unrealized_loss and charge it at the time of closing the position.

good idea, updated

@hjchan hjchan changed the title able to update position able to increase position Mar 15, 2023
@hjchan hjchan marked this pull request as ready for review March 15, 2023 08:10
@hjchan hjchan requested a review from askibin as a code owner March 15, 2023 08:10
@hjchan hjchan mentioned this pull request Mar 18, 2023
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