-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
add spec for x/derivatives #353
Conversation
I wrote down the fundamental features and specifications in a text besides basic data structures. |
x/derivatives/spec/01_concepts.md
Outdated
|
||
## Liquidity Provider Token | ||
There's no dynamic change of the minting and redemption fee rate at this moment unlike GMX. It's the static rate which is defined in the protocol. But, it can be modified through the governace voting. |
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.
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 modified it.
Please check the above line.
x/derivatives/spec/01_concepts.md
Outdated
The position can be covered by two types of asset as margin, which are the tokens of the trading pair. If you trade 'BTC/USDC' pair, you can deposit BTC or USDC as margin. The profit will be distributed in the same token as the margin if there's some. | ||
The created position cannot be modified except for closing a whole in the current implementation. | ||
And, the liquidation is triggered against each position. The margin of the position cannot be added afterward now. But, this will be supported in the near future. | ||
The max leverate rate is defined in the params of the protocol for all trading pairs equially. This can be modified through the governance voting. |
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.
leverate
leverage
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 fixed them.
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.
Just one remaining thing should be added, but others LGTM.
|
||
## Liquidity Provider Token | ||
There's dynamic change of the minting and redemption fee rate at this moment. There's the static rate which is defined in the protocol. And, the actual fee rate also consider the difference of asset proportion between target and actual proportion. The static base fee rate can be modified through the governace voting. | ||
|
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.
Plz add something like
mintFeeRate is proportion to max(0, (actualAmountInPool[i] - targetAmount[i]) / targetAmount[i])
redeemFeeRate is proportion to max(0, -(actualAmountInPool[i] - targetAmount[i]) / targetAmount[i])
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.
Okay, thanks for the content.
Will put it.
By the way, I (and @mkXultra ) are planning to increment those more technical specs hereafter the general spec on text is fixed.
fill spec