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

Multichain compatibility documentation needs improvement #5

Open
hiroshi-yamamoto-dublr opened this issue Sep 8, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@hiroshi-yamamoto-dublr
Copy link

hiroshi-yamamoto-dublr commented Sep 8, 2022

I am trying to add Multichain support to my token. The documentation needs a lot of improvement, which is why I am filing these questions as a bug report

I have followed the advice here:

https://docs.multichain.org/developer-guide/how-to-develop-under-anyswap-erc20-standards

I have several questions:

(1) Is it true that you only need the three functions mint(address,uint256), burn(address,uint256) and underlying() (returning address(0)) to get full Multichain compatibliity? (This is my implementation of these functions.)

Are there other functions that are not required, but will provide additional Multichain-supported functionality, such as transferWithPermit?

In particular, I assume functions like deposit, withdrawal, vault functionality, etc. do not need to be included in my token?

(2) How do I obtain the official approved router addresses for Multichain? Somewhere in your documentation, it says that the router addresses can be obtained on request, but that they will be available programmatically in future. How far away is the programmatic API for fetching router addresses? Where do you hold the official list of router addresses currently?

(3) I also wanted to ask about the permitting API supported in the Anyswap V5 template (but not present in the V6 template). Specifically, in the functions permit​ and transferWithPermit​, there is this line:

require(verifyEIP712(target, hashStruct, v, r, s) || verifyPersonalSign(target, hashStruct, v, r, s));​

This actually breaks EIP2612 compatibility for the permit​ function, because verifyPersonalSign​ is not supported in the EIP2612​ standard -- it uses this different format for the permit hash:

keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", DOMAIN_SEPARATOR, hash))​

What is the purpose of this? Under what circumstances will a user submit a signed message to an Anyswap token signed using the following hash? How are these signatures produced? By wallet software? Is this sort of signature support needed in Multichain?

(4) Once my token is compatible with Multichain, and launched, how do I get it listed on your site?

(5) What precautions do you take to ensure your routers are bug-free and never compromised? Do you offer any sort of recourse or compensation for runaway minting or burning of tokens, due to some bug or security vulnerability in your code?

@jowenshaw jowenshaw added the documentation Improvements or additions to documentation label Sep 9, 2022
@jowenshaw
Copy link
Contributor

thanks for your questions,

(1) the required functions are dependent

if your underlying is address(0), the answer is yes. the required functions are only three: mint, burn, underlying.

deposit and withdraw is only required when underlying is non zero address and is not mintable, we need this functions for people to add and remove liquidity to this pool.

transferWithPermit is optional (not required), the router did not use this function. for simplisity, the latest AnyswapV6ERC20.sol has removed this function.

please ref this wiki for more info
https://github.com/anyswap/CrossChain-Router/wiki/How-to-write-anytoken-wrapper-contract-to-support-Multichain-Bridge-Router

(2) at present our deployed contract addresses are configured at local place.

I'm not sure whether and when programmatic API for fetching router addresses will be done.

(3) function related with permit is not used by us to complete cross-chain.

it's just the extenstion of ERC20 token itself. we have delete this advanced extension at latest version. but the project itself can add these functions and other extentions if they want.

verifyPersonalSign is previously added for special usage on special blockchain, because this is not common standard, and is advanced extension, we removed all of thes functions, leave the project itself to decide how to extend.

(4) for listing
please ref https://docs.multichain.org/for-partners/for-partners/faq
and go here
https://dard6erxu8t.typeform.com/to/C7RwF08A?typeform-source=multichain.org

(5) for security and bug bounty
please ref https://docs.multichain.org/getting-started/security

others
our home page https://multichain.org/
our support https://multichain.zendesk.com/hc/en-us
our contacts

telegam https://t.me/anyswap
twitter https://twitter.com/MultichainOrg
medium https://medium.com/multichainorg

@jowenshaw jowenshaw pinned this issue Sep 9, 2022
@hiroshi-yamamoto-dublr
Copy link
Author

Thank you @jowenshaw for providing such detailed responses to all my questions!

I understand the process much better now.

Can I please suggest that you please update the following page with some of the information and links you provided, so that others can benefit?

https://docs.multichain.org/developer-guide/how-to-develop-under-anyswap-erc20-standards

Much appreciated!

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

No branches or pull requests

3 participants
@jowenshaw @hiroshi-yamamoto-dublr and others