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

Where can I find rate model data? #22

Open
mookim-eth opened this issue Apr 24, 2022 · 4 comments
Open

Where can I find rate model data? #22

mookim-eth opened this issue Apr 24, 2022 · 4 comments

Comments

@mookim-eth
Copy link

Hi, there, I'm developer of BridgeEye, and I have already intergrated your bridge for the old version (only supporting ETH, USDC from Arbitrum to Ethereum now ), code here: https://github.com/DeFiEye/BridgeEye/blob/master/crosschain/acrossto.py

Since your bridge have upgraded to support more chains (Boba and Optimism), and more tokens like WBTC, I need to also modify my code to keep update.

Could you provide a easy method for me to get rate model data, I know I can get this data from your docs page by human effort and hard-code it to my code, but I think it should be a more elegant way to achieve this.

Besides, I think I hard-coded these constants, can I fetch these latest value to avoid hard-code?

  • Supported Chains
  • Pool Contract
  • Token config: bar, r0, r1, r2
  • Gas constants like FAST_ERC_GAS , and gas discount 25%

Thanks in advance~

@daywiss
Copy link
Contributor

daywiss commented Apr 25, 2022

We switched to using on chain rate models in the last couple months. We have javascript libraries i could point you to, but if you are using python this might not be helpful. Whats the best way for you to get this information? We could potentially make some restful routes to provide this info.

@mrice32
Copy link
Contributor

mrice32 commented Apr 25, 2022

@mookim-eth we also have an API that you can use to determine fees: https://docs.across.to/bridge/developers/sending-relays. Would that be preferable to computing the fees yourself?

@mookim-eth
Copy link
Author

@daywiss @mrice32 Thanks, this REST api is of great help!

Could you add another API for fetching current supporting chain and tokens? So that I can iterate all possible l2Token and chainId. I found this info here: https://github.com/across-protocol/frontend-v2/blob/master/src/data/tokens.json, but i don't know is this file will be updated?

@mrice32
Copy link
Contributor

mrice32 commented Apr 27, 2022

@mookim-eth It's a great question. We can probably add something to the API to expose this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants