0

I was looking at the Bancor's documentation and was particularly interested in the Bancor API, mostly the convert function as described here.

I've seen that it says only ETH is supported as of yet but I actually have a couple questions:

  1. Is there an equivalent API Call on EOS?
  2. If there is not, can we "do the math" manually on EOS to avoid waiting for this being ported to EOS?

Many thanks in advance for your answers,

0

It looks like their API only supports ETH and the docs say that it's in alpha, so we may see it supporting EOS soon. You can ask in their Telegram to see if the API is ahead of their docs.

With that said, they have a separate repo for their eos contract. From the readme:

BancorNetwork is the entry point for any token to any token conversion. BancorConverter is responsible for converting between a specific token and its own reserves.

In order to execute a conversion, the caller needs to transfer tokens to the BancorNetwork contract with specific conversion instructions in the transfer memo.

Here's the description for the eos converter contract and the link to it:

/*
    Bancor Converter
    The Bancor converter allows conversions between a smart token and tokens
    that are defined as its reserves and between the different reserves directly.
    Reserve balance can be virtual, meaning that the calculations are based on
    the virtual balance instead of relying on the actual reserve balance.
    This is a security mechanism that prevents the need to keep a very large
    (and valuable) balance in a single contract.
*/

https://github.com/bancorprotocol/contracts_eos/tree/master/contracts/eos/BancorConverter

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.