-
Notifications
You must be signed in to change notification settings - Fork 212
program: isolated position #1757
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
Open
crispheaney
wants to merge
99
commits into
master
Choose a base branch
from
crispheaney/isolated-position
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit
Hold shift + click to select a range
df3ab76
program: make lp shares reduce only
crispheaney fed9dc6
init
crispheaney e99ffa7
rm more fields
crispheaney 25ab531
make tests build
crispheaney eba3f11
start sdk changes
crispheaney b58cda0
init new margin calc
crispheaney 820c232
deposit and transfer into
crispheaney 9efd808
add settle pnl
crispheaney 75b92f8
program: add withdraw
crispheaney 162fc23
add more ix
crispheaney 82463f3
add new meets withdraw req fn
crispheaney fb57e5f
enter/exit liquidation logic
crispheaney 4de579a
moar
crispheaney 085e805
start liquidation logic
crispheaney 4e7db0f
other liquidation fns
crispheaney 8e89ef4
make build work
crispheaney 8062d60
more updates
crispheaney 991dda9
always calc isolated pos
crispheaney c627c1e
rm isolated position market index logic
crispheaney a00f3a9
moar
crispheaney d435dad
program: rm the isolated position market index
crispheaney ed76b47
some tweaks
crispheaney c13a605
rm some old margin code
crispheaney 4a9aadc
tweak meets withdraw requirements
crispheaney 0d56488
rm liquidation mode changing context
crispheaney 584337b
handle liquidation id and bit flags
crispheaney 15c05ee
more liquidation changes
crispheaney adc2815
clean
crispheaney 0de7802
fix force cancel orders
crispheaney 830c7c9
update validate liquidation
crispheaney 5d09739
moar
crispheaney 7392d3e
rename is_being_liquidated
crispheaney 26960c8
start adding test
crispheaney 2ab06e3
program: add validate for liq borrow for perp pnl
crispheaney 9a56326
program: add test for isolated margin calc
crispheaney b171c23
is bankrupt test
crispheaney 2821269
fix cancel orders
crispheaney 424987f
fix set liquidation status
crispheaney b84daf1
more tweaks
crispheaney ea09842
clean up naming
crispheaney cc397f0
update last active slot for isolated position liq
crispheaney 9833303
another liquidation review
crispheaney 9cb040a
add test
crispheaney 8177496
cargo fmt --
crispheaney 9a8ec1a
tweak naming
crispheaney 6ddbaf8
add test to make sure false liquidaiton wont be triggered
crispheaney 2db2907
test meets withdraw
crispheaney 8314bbe
change is bankrupt
crispheaney 654683c
more
crispheaney 4cab732
update uses of exit isolated liquidaiton
crispheaney 6a6a150
moar
crispheaney 7c46187
moar
crispheaney 51ae2eb
reduce diff
crispheaney bae1b6b
moar
crispheaney d2f08ea
modularize some for tests
crispheaney ba8866a
add tests for the pnl for deposit liquidation
crispheaney 9fa04fa
tests for isolated position transfer
crispheaney a732348
test for update spot balance
crispheaney 91baee3
test for settle pnl
crispheaney 101e311
add perp position max margin
crispheaney 0bc6132
program: test for custom perp position margin ratio
crispheaney 608928f
add test for margin calc for disable hlm
crispheaney fc6bebc
update test name
crispheaney 5f3b7d0
make max margin ratio persist
crispheaney 3c56869
add liquidation mode test
crispheaney bf2839e
more tests to make sure liqudiations dont bleed over
crispheaney eb60940
change test name
crispheaney e8708a8
Merge branch 'master' into crispheaney/isolated-position
crispheaney ba10482
fix broken cargo tests
crispheaney 58df2ff
cargo fmt --
crispheaney 5d61bd3
Merge branch 'master' into crispheaney/isolated-position
crispheaney dd49970
Merge branch 'master' into crispheaney/isolated-position
crispheaney 71fcdfa
first ts test
crispheaney 7af9f65
isolatedPositionLiquidatePerp test
crispheaney e40563e
isolatedPositionLiquidatePerpwithFill test
crispheaney c643a50
fix expired position
crispheaney 16bea30
cargo fmt --
crispheaney 453d93f
program: add transfer isolated pos deposit into swift (#1964)
crispheaney 82fc87f
program: auto transfer to cross margin account (#1939)
crispheaney 28ed029
make build
crispheaney b0a2b67
isolated pos deposit sdk
crispheaney 3bd6eeb
test working
crispheaney 3bd7525
move the auto transfer
crispheaney 283016a
Merge branch 'master' into crispheaney/isolated-position
crispheaney bb45dcd
fix deposit order in swift
crispheaney 69793cf
program: handle looser transfer iso deposit
crispheaney 69b3a72
tweak
crispheaney a7f633c
fix warnings
crispheaney 55d3c65
cargo fmt --
crispheaney d601d35
Merge branch 'master' into crispheaney/isolated-position
crispheaney ddeaa3a
add get total token amount
crispheaney 355bfac
tweaks
crispheaney 64c887d
Merge branch 'master' into crispheaney/isolated-position
crispheaney f4bc397
fmt
crispheaney c994787
fix tests
crispheaney 9aa8dbe
fmt --
crispheaney 83fb642
fix anchor test
crispheaney b6b2d69
more
crispheaney 37a905e
add OrderBitFlag::IsIsolatedPosition (#2049)
wphan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is this going to throw when cross margin under Initial and
to_isolated_position = false?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.
oops yeah gotta delete