question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion: Support of the Standard Relayer API (Contract Addresses vs. Symbols)

See original GitHub issue

While skimming through the available 0x relayers to get a better idea of what exchanges may be possible to be supported, I noticed that the 0x schema for order books actually returns asks and bids in terms of the maker and taker address, not by the resolved symbol. Example: https://github.com/0xProject/standard-relayer-api/blob/master/http/v2.md#get-v2orderbook

Are there plans to support exchanges that use the 0x SRA? This would require the ability to pass in a contract address as an alternative to a symbol. On a similar note, it raises the question of asset resolution. For example, if a user passes ABC, there currently aren’t any checks to ensure that ABC actually corresponds to the same assets. Given the goal of supporting any asset on any exchange, I see a couple paths off the top of my head:

1a) For major exchanges, keep a hard-coded mapping of symbol -> contract address if it’s easily identifiable (ZRX, AST, BNB, etc.) 1b) Only support exchanges that provide tokens included in the “supported assets” mapping 2) Only support exchanges that allow retrieval of order books with contract addresses

And the potential issues:

1a) This obviously has a scaling problem and also brings up issues if contracts are redeployed 1b) This limits the amount of exchanges and assets available unless they’re manually maintained in 1a 2) This allows for more flexibility in the sense that I could provide any address and if it shows up in an exchange we know that it’s the same asset across exchanges but it limits consumers to knowing the address for the token contract, which they may not. Similar to 1b, this limits the amount of exchanges that could be supported.

Just some things that crossed my mind while looking around. Interested to get some feedback. 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
perichcommented, May 30, 2019
1reaction
tmleecommented, Feb 9, 2019

@grahamperich If you are looking to retrieve contract address, you may try our CoinGecko API which requires no key

For instance https://api.coingecko.com/api/v3/coins/0x, you will be able to access the contract address Full docs at https://www.coingecko.com/api

Let me know what you make of that and happy to answer any questions

Read more comments on GitHub >

github_iconTop Results From Across the Web

Standard specifications for 0x relayer public APIs - GitHub
Standard Relayer API ... 0x Protocol is an open standard. Because of this, we expect many independent applications to be built that will...
Read more >
Tools for smart contract automation - LogRocket Blog
Learn about the core concepts of smart contract automation and the pros and cons of popular smart contract automation tools.
Read more >
Meta Transaction Relayers at Scale - Devcon Archive
Earlier this year Bloom's smart contracts were consuming over 2% of all gas on Ethereum mainnet. All coming from one meta transaction relayer....
Read more >
0x: dYdX is now sourcing liquidity from 0x via Radar Relay ...
Contract -fillable liquidity addresses the other side by growing taker volume. ... with 0x's standard relayer API, web socket support will soon be...
Read more >
Proof-Carrying Smart Contracts - Paul Gazzillo
Proofs of cor- rectness for a contract can be checked by validators, who can enforce the restriction that no update can violate ϕ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found