Workers Auto Approve
0x Protocol Price Discovery Riddle (No Code, just WHHHEEERRRREEE!!!!)
solidity, smart, contract, 0x, protocol
Riddle: How do you do price discovery through 0x Protocol's Exchange smart contract?
Facts and hints collected while attempting this along the way. If you want to chat about this, just ping me on telegram: @mikeproof.
This obviously can be done... dYdX queries pricing data from 0x's protocol like this: https://github.com/dydxprotocol/exchange-wrappers/blob/master/contracts/exchange-wrappers/ZeroExV2ExchangeWrapper.sol
Their actual deployed contracts are here: https://docs.dydx.exchange/#/contracts
However, it does indeed reference an old 0x contract. Also if you actually use the deployed contract it won't seem to work if you're using Etherscan's contract read feature, because it returns a struct and web3 doesn't support tuples/structs... so hard to test if it works... We would need a smart contract to call it, pull data out of the struct, etc.
This 0x application can do price discovery by querying smart contracts: https://0x.org/docs/guides/contract-fillable-liquidity#step-2-passing-0x-orders-to-a-smart-contract
Hints to the answer are probably here too:
So, it's possible, because it's getting data from the blockchain, right?
Further hint, maybe: https://github.com/0xProject/0x-monorepo/blob/development/contracts/exchange/contracts/src/Exchange.sol
Here are 0x's contracts on mainnet:
This issue is just identifying an existing contract that we can use as an interface (somewhere somehow) and method within it we can call with 2 tokens, a buy or sell order side, and amount to get price. From there, we can integrate it in.
You can see how we're doing it with other platforms here: https://github.com/ProofSuite/OrFeedSmartContracts/blob/master/contracts/draftpremium.sol
via view functions that do not require gas to get the data, etc.
Setup your profile
Tell us a little about you:
No results found for
Type to search skills..
Required [[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Setup your profile
Our tools are based on the principles of earn (💰), learn (📖), and meet (💬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email: