Giter Site home page Giter Site logo

core's Introduction

core's People

Contributors

boris-bonin avatar carry-element avatar georgeroman avatar ivostoynovski avatar jfrazier-eth avatar lljxx1 avatar ptrwtts avatar relyt29 avatar smatthewenglish avatar vikinatora avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

core's Issues

Setup GitHub actions

We should setup GitHub CI for making sure all new commits are passing the tests.

Router Contract V1

  • Allow marketplaces / referrers to collect fees on top
  • Attribution for who got the order filled (emit an event)

Due to the added gas cost, the router contract is only used if explicitly opted into by the taker application (by setting their wallet address).

Add Seaport for all chains

The address is always the same, so we might as well go ahead and set it for all chains, so that if we want to launch a chain, it's already ready:

Currently deployed chains:

  • Ethereum
  • Rinkeby
  • Goerli
  • Kovan
  • Polygon
  • Mumbai
  • Optimism
  • Optimistic Kovan
  • Avalanche Fuji
  • Avalanche C-Chain
  • Gnosis Chain

Coming Soon:

  • Baobab
  • Klaytn
  • Arbitrum Rinkeby
  • Arbitrum

BUG: SDK Circular Dependency

Noticed this while playing with SDK:

(!) Circular dependencies
node_modules/@reservoir0x/sdk/dist/wyvern-v2/index.js -> node_modules/@reservoir0x/sdk/dist/wyvern-v2/exchange.js -> node_modules/@reservoir0x/sdk/dist/wyvern-v2/order.js -> node_modules/@reservoir0x/sdk/dist/wyvern-v2/index.js
node_modules/@reservoir0x/sdk/dist/wyvern-v2/index.js -> node_modules/@reservoir0x/sdk/dist/wyvern-v2/exchange.js -> node_modules/@reservoir0x/sdk/dist/wyvern-v2/order.js -> /Users/peter/Git/unevenlabs/marketmaker/node_modules/@reservoir0x/sdk/dist/wyvern-v2/index.js?commonjs-proxy -> node_modules/@reservoir0x/sdk/dist/wyvern-v2/index.js

SDK Improved Errors

When you pass incorrect values to the SDK, it often just returns undefined. This makes it quite difficult to debug on the client. Is there any way to return a more useful error? Even if its the whole error object, it could a least give a bit more of a clue.

Allow passing a `source` when filling

Up until now we've tried to use referrer for attributing sales, but it's opaque and doesn't scale keeping track of who owns each referrer in a decentralized way. It's also difficult for app developers to understand, and reason about what the address is for.

Instead we should use a text-based source for attribution. The idea is that it will be a url, as outlined here: https://github.com/reservoirprotocol/indexer/issues/1106

We probably still want to keep referrer, but now it is purely for collecting fees and rewards. As a result, it may makes sense to have separate withReferrer methods, to save gas in cases where no fees or rewards are collected.

Direct filling with referrer

As discussed, we want to fill directly with Seaport if all orders are Seaport orders. Importantly, we still want to be able to capture the referrer, e.g. by putting it at the end of the calldata like 0age suggested (or a different method if that doesn't work).

There are many applications that are currently filling with Seaport, and not getting any credit for it. So once we have this feature, we can reach out to them, and suggest that they use our SDK for filling. To that end, we should make it as simple as possible for such applications to migrate. E.g. the methods should maybe be identical to the seaport SDK methods, just with the addition of a referrer.

Related, we should see if it's possible to append a referrer when filling on other exchanges, and support this feature universally across all exchanges. In scenarios where it's not possible to fill directly with a referrer, it would go via the Router, but still with the goal of being as close to the exchange method as possible, making migration simple.

Once we have this, then we also want to make sure we are extracting the referrer in the indexer for any sales.

Router Precheck

In the router, add the option to perform a precheck on fills. This slightly increases the gas to fill, but dramatically reduces the gas wasted in the event that the item is no longer available.

Referral Bounties

Goal

Marketplaces can offer a % of their fee to whoever fills the order. If no referrer is specified, the whole fee goes to the marketplace. Unlike a taker fee, which is added on top, this comes out of the maker fee, which is more desirable (because it means the price is the same no matter where it is filled).

The idea is to build this via the Router, so that it works with any exchange. Long term, it's likely that more exchanges will support this natively (similar to Zora and Foundation), and we can migrate to using that native functionality.

Execution

  • Marketplace uses a special contract for receiving fees, which allows the Router to withdraw ETH
  • When filling, Router checks if the fee recipient is one of these contracts
  • If so, it detects how much was transferred to the contract over the course of the tx, and transfers the bounty to the referrer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.