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

Implement a Router contract to add new functionality #23

Open
bghughes opened this issue Aug 25, 2021 · 0 comments
Open

Implement a Router contract to add new functionality #23

bghughes opened this issue Aug 25, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@bghughes
Copy link
Contributor

Add a Router contract that utilizes the low-level functions available in the protocol to provide new functionality and data. This router should implement the following functions:

  • swap - the ability to route an order from one token on Rubicon to any other through the order book with some amount of slippage
  • getBestOfferAndInfo: "It would be great to find the best offer AND retrieve its data in just one call. Today we have to first call getBestOffer which returns the orderId and with it, then perform a 2nd call to GetOrder(id) using the retrieved id. So, would be nice to change GetBestOffer to return the whole object instead of just the id"

Experimental functions to consider here:

  • getOpenOrders(ERC20 sell, ERC20 buy): number of open orders for a given pair
  • getOutstandingLimitOrders(address entity, address ERC20): outstanding orders in the order book for a given address.
@bghughes bghughes added the enhancement New feature or request label Aug 25, 2021
@bghughes bghughes self-assigned this Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant