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

Feat/trading on dex #7

Merged
merged 51 commits into from
Jan 17, 2025
Merged

Feat/trading on dex #7

merged 51 commits into from
Jan 17, 2025

Conversation

q20274982
Copy link
Member

@q20274982 q20274982 commented Jan 2, 2025

  • Pair 的基礎貨幣從 USDC 遷移到 IP(Native Token)
  • 新增上架到 PiperX 機制
  • 具體介面更新可以參考這裡

SPEC
Wow

@q20274982 q20274982 marked this pull request as ready for review January 6, 2025 10:44
@q20274982 q20274982 changed the title WIP: Feat/trading on dex Feat/trading on dex Jan 6, 2025
@q20274982 q20274982 changed the base branch from develop to feat/spotlight-token January 7, 2025 08:33
@q20274982 q20274982 force-pushed the feat/trading-on-dex branch from 302a0e7 to e773645 Compare January 9, 2025 04:12

uint256 deltaY = (exp_b_x1 - exp_b_x0).fullMulDiv(A, B);

// adjust for 12 decimal places difference between deltaY and basedTokensIn
Copy link
Contributor

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}.
Copy link
Contributor

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%
Copy link
Contributor

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();
Copy link
Contributor

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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IPAmountTooSmall

@yuhsuan19
Copy link
Contributor

ISpotlightTokenFactory.sol
InitialBuy參數再記得幫忙調整 thx~~

@yuhsuan19
Copy link
Contributor

感覺可以把上一支關掉,這支直接進develop

@q20274982 q20274982 changed the base branch from feat/spotlight-token to develop January 13, 2025 06:14
@q20274982 q20274982 merged commit 593ec39 into develop Jan 17, 2025
2 checks passed
@scottphc scottphc deleted the feat/trading-on-dex branch January 17, 2025 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants