KomodoPlatform / komodo-defi-framework

This is the official Komodo DeFi Framework repository
https://komodoplatform.com/en/docs/komodo-defi-framework/
97 stars 88 forks source link

[Protocol Integration]: BEP20 support #801

Closed Milerius closed 3 years ago

Milerius commented 3 years ago

I propose to add the BEP20 smart chain binance protocol to be able to afford suitable and low costs in AtomicDEX

Benefits:

Requirements:

Documentation:

cc @cipig @ca333

Cryptosaurus89 commented 3 years ago

Should have some priority as BSC is getting lots of attention..

jvr-research commented 3 years ago

I could really use something like this right now.

KMD deposit times are 1-2 hours on Binance which is very inconvenient at times and still has to go through BTC first. I would use this pairing almost on a daily basis.

ptyx11 commented 3 years ago

let's get KMD also on BEP20

jvr-research commented 3 years ago

Brilliant idea

On Sat, Feb 27, 2021, 4:31 PM PTYX11 notifications@github.com wrote:

let's get KMD also on BEP20

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/KomodoPlatform/atomicDEX-API/issues/801#issuecomment-787197838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIZ2YGPJM6JTENZYWC3PL5LTBFXEDANCNFSM4W4JCHSQ .

phm87 commented 3 years ago

let's get KMD also on BEP20

I agree, it is a good idea, it was discussed today on discord but tokenize KMD on BSC is not related to AtomicDEX.

It seems that LTC and BCH are tokenized on BSC, I didn't find all details yet, here are some links I found.

https://www.binance.org/en/blog/anyswap-crosschain-dex-on-bsc/

How to join the BSC Cross-Chain Bridge

AnySwap Cross-Chain Bridge can dynamically add token support, and any ANY token holder (more than 1000 ANY token) can initiate a token cross-chain support proposal.

Initiate a proposal: https://vote.anyswap.exchange/#/anyswap/create

https://github.com/pancakeswap/pancake-swap-interface/blob/master/listing.md

https://lightrains.com/blogs/how-create-binance-token

  1. List your token Once the proposal is passed, you can them list your token. The fee of listing is 800 BNB. Article is from 2019 so I hope that the 800 BNB listing fee was lowered.

I hope that we'll be able to get KMD tokenized on BSC and create a BNB KMD Liquidity Pool. https://github.com/phm87/pancake-frontend/pull/1/files

ca333 commented 3 years ago

https://bscscan.com/token/0x2003f7ba57ea956b05b85c60b4b2ceea9b111256 - BEP20 KMD Token

phm87 commented 3 years ago

https://bscscan.com/token/0x2003f7ba57ea956b05b85c60b4b2ceea9b111256 - BEP20 KMD Token

😍 https://bscscan.com/address/0x24b9b6c7b3b2c1a9c1f783228edf7d241091384a - PancakeSwap: KMD-BUSD I hope that it will be added soon to the Main Staking Contract of PancakeSwap

artemii235 commented 3 years ago

https://docs.binance.org/smart-chain/developer/rpc.html - BSC RPC URLs. https://testnet.binance.org/faucet-smart - BSC testnet faucet. https://testnet.bscscan.com - BSC testnet explorer. https://docs.binance.org/smart-chain/wallet/metamask.html - metamask configuration guide. https://github.com/binance-chain/bsc-genesis-contract/blob/master/contracts/bep20_template/BEP20Token.template - BEP20 sample implementation https://testnet.bscscan.com/token/0x464ee03fbfc10f2fc8677ee87d27ba3fd3aa4b09 - ADEX BEP20 token on testnet https://testnet.bscscan.com/address/0xccd17c913ad7b772755ad4f0bdff7b34c6339150 - Etomic swap smart contract on BSC testnet

https://bscscan.com/address/0xedc5b89fe1f0382f9e4316069971d90a0951db31 - Etomic swap smart contract on BSC mainnet https://bscscan.com/address/0x28e0685cc4c57a1ccf27090678a34ebd6a641ac3 - ADEX BEP20 token on mainnet

artemii235 commented 3 years ago

@Milerius You can now test it using the latest build from http://195.201.0.6/mm2.1-bsc/

Coins config for BNB and ADEX (test BEP20) testnet and mainnet:

    {
        "coin": "BNBT",
        "name": "binancesmartchaintest",
        "fname": "Ethereum",
        "avg_blocktime": 0.25,
        "rpcport": 80,
        "mm2": 1,
        "required_confirmations": 3,
        "protocol": {
            "type": "ETH"
        }
    },
    {
        "coin": "ADEXBSCT",
        "name": "adex_bsc_testnet",
        "fname": "adex",
        "rpcport": 80,
        "mm2": 1,
        "protocol": {
            "type": "ERC20",
            "protocol_data": {
                "platform": "BNBT",
                "contract_address": "0x464Ee03fBfC10f2FC8677Ee87d27bA3FD3aa4B09"
            }
        }
    },
    {
        "coin": "BNB",
        "name": "binancesmartchain",
        "fname": "Ethereum",
        "avg_blocktime": 0.25,
        "rpcport": 80,
        "mm2": 1,
        "required_confirmations": 3,
        "protocol": {
            "type": "ETH"
        }
    },
    {
        "coin": "ADEXBSC",
        "name": "adex_bsc",
        "fname": "adex",
        "rpcport": 80,
        "mm2": 1,
        "protocol": {
            "type": "ERC20",
            "protocol_data": {
                "platform": "BNB",
                "contract_address": "0x28E0685cc4C57a1CCF27090678A34Ebd6a641AC3"
            }
        }
    },

Enabling on testnet:

curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"enable\",\"coin\":\"BNBT\",\"urls\":[\"https://data-seed-prebsc-1-s2.binance.org:8545\"],\"swap_contract_address\":\"0xcCD17C913aD7b772755Ad4F0BDFF7B34C6339150\"}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"enable\",\"coin\":\"ADEXBSCT\",\"urls\":[\"https://data-seed-prebsc-1-s2.binance.org:8545\"],\"swap_contract_address\":\"0xcCD17C913aD7b772755Ad4F0BDFF7B34C6339150\"}"

Enabling on mainnet:

curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"enable\",\"coin\":\"BNB\",\"urls\":[\"https://bsc-dataseed.binance.org\"],\"swap_contract_address\":\"0xeDc5b89Fe1f0382F9E4316069971D90a0951DB31\"}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"enable\",\"coin\":\"ADEXBSC\",\"urls\":[\"https://bsc-dataseed.binance.org\"],\"swap_contract_address\":\"0xeDc5b89Fe1f0382F9E4316069971D90a0951DB31\"}"
artemii235 commented 3 years ago

@Milerius Please note that builds from http://195.201.0.6/mm2.1-bsc/ are not production ready and we also need this PR to be merged for proper fee ticker display: https://github.com/KomodoPlatform/atomicDEX-API/pull/861

Milerius commented 3 years ago

Implemented in #876