DistributedCollective / DistributedCollective/Sovryn-smart-contracts
Liquidity is too low for closing position
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 132
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
A user created a 5x short position at a price of $57.000; the position size is of $390

Then the user is trying to close it, but it seems there is not enough liquidity.
The bug here is related to tha fact that there should be some logical condition in the contract set preventing this kind of fails.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by locating the smart-contract entry points for opening and closing leveraged positions, then reproduce the reported 5x short close using the supplied price and position size; done means the insufficient-liquidity failure is prevented and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100