-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/trading on dex #7
Conversation
302a0e7
to
e773645
Compare
|
||
uint256 deltaY = (exp_b_x1 - exp_b_x0).fullMulDiv(A, B); | ||
|
||
// adjust for 12 decimal places difference between deltaY and basedTokensIn |
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.
should be removed
@@ -170,6 +157,7 @@ interface ISpotlightTokenFactory { | |||
|
|||
/** | |||
* @dev Creates a new token with the specified parameters and initializes it. | |||
* @notice Creation fee must be paid in native token. | |||
* @param tokenCreationData Details for creating the token. | |||
* @param initialBuyData Details for the initial purchase of the token. | |||
* @param derivData Details for creating a derivative token. See {IStoryDerivativeWorkflows-registerIpAndMakeDerivative}. |
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.
suggestion: include description for newly added params
abstract contract SpotlightTokenStorage { | ||
// @dev v1 properties | ||
uint256 public constant BONDING_CURVE_SUPPLY = 800_000_000e18; // 0.8 billion | ||
uint256 public constant PROTOCOL_TRADING_FEE_PCT = 1; // 1% | ||
uint256 public constant MIN_USDC_ORDER_SIZE = 100; // 0.0001 USDC | ||
uint256 public constant PROTOCOL_TRADING_FEE_PCT = 9_000; // 90% |
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.
should be bps?!
@@ -21,6 +32,13 @@ contract SpotlightToken is BeaconProxyStorage, InitializableERC20, SpotlightToke | |||
_; | |||
} | |||
|
|||
error SlippageBoundsExceeded(); | |||
error EthTransferFailed(); |
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.
IPTransferFailed
error InvalidMarketType(); | ||
error InsufficientLiquidity(); | ||
error AddressZero(); | ||
error EthAmountTooSmall(); |
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.
IPAmountTooSmall
ISpotlightTokenFactory.sol |
感覺可以把上一支關掉,這支直接進develop |
SPEC
Wow