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

CYBER and GOLOS by Cyberway cryptogateway #23

Open
Kwaskoff opened this issue Mar 23, 2020 · 4 comments
Open

CYBER and GOLOS by Cyberway cryptogateway #23

Kwaskoff opened this issue Mar 23, 2020 · 4 comments

Comments

@Kwaskoff
Copy link
Member

Kwaskoff commented Mar 23, 2020

Make a roadmap for cyberway cryptogateway

@leinlawun
Copy link
Collaborator

The Golos integration task is faster. What is the priority?

@Kwaskoff
Copy link
Member Author

The Golos integration task is faster. What is the priority?

golos.io is GOLOS dapp on CYBERWAY. If you can make GOLOS dapp tokens faster - do it!

@leinlawun
Copy link
Collaborator

leinlawun commented Apr 21, 2020

Token standard

  1. Use a standard smart contract cyberway.token.
  2. Use a non-standard smart contract.

Depends on the token. It is possible that the required token can be issued on another smart contract with a different interface. The logic of the gateway may then be different.

Token issuer

  1. We are.
  2. Not us.

In case if the issuer of token is us: when exchanging the amount of token in blockchain X for a token in blockchain cyberway, in blockchain X the amount of token is blocked in our account or burned, and in blockchain cyberway is issued the necessary amount of token, which is calculated at the exchange rate. In the opposite direction the following happens: when exchanging a certain amount of token in the cyberway blockchain for a token in blockchain X, in the cyberway blockchain the amount of token is burned, and in blockchain X from our account is unlocked or issued the necessary amount of token, which is calculated at the exchange rate.

In case the issuer of the token isn't us: when exchanging the amount of token in blockchain X for a token in blockchain cyberway, in blockchain X the amount of token is blocked in our account or burned, and in blockchain cyberway from our account unlocked or issued the necessary amount of token, which is calculated at the exchange rate. In the opposite direction the following happens: when exchanging a certain amount of token in the cyberway blockchain for a token in blockchain X, in the cyberway blockchain the amount of token is blocked in our account, and in blockchain X from our account is unlocked or issued the necessary amount of token, which is calculated at the exchange rate.

As you can see, the difference between the two approaches is that if the issuer is us, we don't need to form an account at the cyberway blockchain, we issue or burn, and if the issuer isn't us, we need to form an account at the cyberway blockchain, because we aren't authorized to perform issuing or burning operations, in this case we'll unblock from our account or block in our account. On this basis, the logic of the gateway will be different, and it may be necessary to store a certain amount of token in blockchain cyberway.

Smart contract code

If we use a non-standard smart contract and token issuer, we do:

  1. We use a third-party smart contract code.
  2. We write our own smart contract code.

It depends on the task at hand. It is unlikely that we'll even need to write our own code, but we need to stop possible misunderstandings.

Integration

It follows from all this that we have the following options for integrating the gateway and cyberway:

  1. Standard smart contract, the issuer is us.
  2. Standard smart contract, the issuer isn't us.
  3. Not a standard smart contract, the issuer is us, a third-party smart contract code.
  4. Not a standard smart contract, the issuer is us, our own smart contract code.
  5. Not a standard smart contract, the issuer isn't us.

Requirements for the project manager

  1. Specify the list of required tokens.
  2. Find out if they are on the blockchain.
  3. If not, specify the standard of smart contract for deploying.
    1. If a non-standard smart contract, specify whether we use a third-party code (and a link to the repository) or our own.
      1. If the code is yours, specify the business task.

@Kwaskoff
Copy link
Member Author

All tokens on cyberway you can see here
https://explorer.cyberway.io/tokens

First of all make gateway for
GOLOS issued by gls
Precision: 3 decimals
This is standard dapp
https://docs.cyberway.io/devportal/system_contracts/cyber.token_contract

Code of GOLOS dapp is here
https://github.com/cyberway/golos.contracts

For ABI
https://developers.eos.io/manuals/eos/latest/cleos/command-reference/get/abi

Next make gateway for
CYBER issued by cyber
Precision: 4 decimals
It’s not dapp. It’s native token of the cyberway blockchain. Like EOS tokens in the EOSIO blockchain.

Public nodes
https://node-cyberway.golos.io
https://github.com/cyberway/cyberway.launch/blob/master/apinodes

Test account is i4mvdrqc3jxk with GOLOS dapp tokens and CYBER native tokens
Active private key for request

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

2 participants