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(PCL duality): add PCL with Duality orderbook integration #438

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

epanchee
Copy link
Collaborator

The idea of contract is to reflect certain part of PCL liquidity into orders on the orderbook. Contract creates fixed amount of orders on each side (buy and sell) based on our fixed heights algorithm. This algorithm ensures that resulting price in orderbook will match the price in PCL if it was swapped through contract directly.

This contract is highly integrated with Duality dex module on Neutron. Meaning, every time someone provides/withdraw/swaps through pool it automatically closes all outstanding orders, processes fees and creates the new ones based on new pool state (both PCL params and reserves amount).

In case PCL pool is stale and doesn't receive arb trades between orderbook and pool we implemented a separate endpoint which helps to sync pool with orderbook. This endpoint may or may not be permissioned to a certain address.

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.

1 participant