Skip to content
This repository was archived by the owner on Feb 21, 2026. It is now read-only.

add limit order pool integration#1

Open
0xKermo wants to merge 2 commits into
EkuboProtocol:mainfrom
0xKermo:limit-order_imp
Open

add limit order pool integration#1
0xKermo wants to merge 2 commits into
EkuboProtocol:mainfrom
0xKermo:limit-order_imp

Conversation

@0xKermo

@0xKermo 0xKermo commented Jan 21, 2025

Copy link
Copy Markdown

added limit order pool integration and tests according to rust sdk test cases.

I left comments about other changes

…riceChange property and improving code formatting. Update tests to validate new property behavior.

@0xKermo 0xKermo left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

comments

Comment thread src/math/tick.ts

return Math.floor(Math.abs(logPriceDiff / (tickSpacing * 251)));
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I implemented this function from rust sdk. Limit order tests succes with this func
maybe i did something wrong here

Comment thread src/nodes/basePool.ts
? toSqrtRatio(nextInitializedTick.tick)
: null;

*/

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i changed here with my implementation but It works in limit order pool tests but other test scenarios are failed (base pool, twamm...)
maybe I did smth wrong here

Comment thread src/nodes/basePool.ts
activeTickIndex = isIncreasing
? activeTickIndex + 1
: activeTickIndex - 1;
? nextInitializedTick.index

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

change here due to the above changes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant