Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

limit order support in precompile #2678

Open
Assignees

Description

problem description

EVM need support limit order via precompile.

limit orders, like limitBuy, limitStopLoss, limitTakeProfit are supported in the limit-order pallet in #2554.

The flow is:
Users sign the off-chain orders (any of the above)
Relayers has a validation engine that checks if a specific order will pass, and submit those orders on-chain.
The pallet validates orders (signature verification + order condition) and execute them either in sequence - execute_orders or in batch: execute_batched_orders.

Describe the solution you'd like

The possible solution will be provided later. Current blockers as follows:

  • rate limiting on (hotkey, coldkey, netuid), so there is no way to do several operations from the batch.
  • intermediary address - for now how pallet is doing it, it can balance sells and buys to redistribute funds across across orders in batch.
  • off-chain signatures - we need to validate user's signature and be able to do the staking operation on user's behalf, we have transferStakeFrom that enforce to submit on-chain transaction before the actual order.
  • use MEV shield on top of it.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /