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

Perpetual Futures #977

Closed
9 tasks done
Tracked by #1178
holzeis opened this issue Jul 21, 2023 · 4 comments
Closed
9 tasks done
Tracked by #1178

Perpetual Futures #977

holzeis opened this issue Jul 21, 2023 · 4 comments
Labels
Milestone

Comments

@holzeis
Copy link
Contributor

holzeis commented Jul 21, 2023

At the moment we have an expiry timestamp on every position. After it has been expired we will trigger a collaborative closure once the user is back online. With perpetual positions we want to add the possibility to "rollover" a position and extend it.

@holzeis holzeis transferred this issue from another repository Jul 21, 2023
@holzeis holzeis transferred this issue from another repository Jul 21, 2023
@holzeis holzeis added the epic label Jul 21, 2023
@bonomat bonomat modified the milestone: 1.3.0 Jul 24, 2023
@bonomat bonomat changed the title Perpetual Positions Perpetual Futures Aug 4, 2023
@bonomat bonomat removed the grooming label Aug 5, 2023
@holzeis
Copy link
Contributor Author

holzeis commented Aug 17, 2023

Below a proposal of how perpetual futures could look like for the users.

sequenceDiagram

actor u as User
participant a as App
participant c as Coordinator

Note right of a: Position is about to expire. e.g. in 2 hours

c->>u: Push notification: Come online to rollover your position.
u->>a: Starts 10101 app
a-->>u: Show dialog for extending position

alt Extend position
	a-->>c: Extend position
	c->>c: Calculate funding rate
	c->a: Execute extend position protocol
	a->>a: Update position
	a-->>u: Show finished extending position
else Close position
	a-->>c: Close position
	c-->a: Execute collaborative close position protocol
	a->>a: Remove position
	a-->>u: Show finished close position
end
Loading

I propose we let the user decide on to either extend or close the position. That could be a simple dialog with a Yes / No Option on startup (if position is about to expire)

@klochowicz
Copy link
Contributor

what's the advantage of asking the user a question instead of extending it automatically until the user wants to close the trade?

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Sep 29, 2023
@bonomat
Copy link
Contributor

bonomat commented Sep 29, 2023

Mostly done :)

@github-actions github-actions bot removed the Stale label Sep 30, 2023
@bonomat bonomat closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants