{"id":13407787,"url":"https://github.com/multiversx/mx-bridge-eth-sc-rs","last_synced_at":"2025-10-06T14:04:47.416Z","repository":{"id":38310760,"uuid":"341144508","full_name":"multiversx/mx-bridge-eth-sc-rs","owner":"multiversx","description":"Smart contracts on the MultiversX side for cross-chain bridge","archived":false,"fork":false,"pushed_at":"2025-09-01T14:08:08.000Z","size":97764,"stargazers_count":23,"open_issues_count":12,"forks_count":19,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-09-01T16:18:24.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/multiversx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-22T09:24:30.000Z","updated_at":"2025-05-31T23:15:14.000Z","dependencies_parsed_at":"2023-10-16T18:51:27.978Z","dependency_job_id":"4312f179-8128-4aee-8818-2e06a224bceb","html_url":"https://github.com/multiversx/mx-bridge-eth-sc-rs","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/multiversx/mx-bridge-eth-sc-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-bridge-eth-sc-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-bridge-eth-sc-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-bridge-eth-sc-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-bridge-eth-sc-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multiversx","download_url":"https://codeload.github.com/multiversx/mx-bridge-eth-sc-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversx%2Fmx-bridge-eth-sc-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278621844,"owners_count":26017253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:00:48.646Z","updated_at":"2025-10-06T14:04:47.377Z","avatar_url":"https://github.com/multiversx.png","language":"Rust","funding_links":[],"categories":["MultiversX official"],"sub_categories":["Smart contracts"],"readme":"# MultiversX-Ethereum Bridge\n\n## Abstract\nIn this repository, you will find smart contracts on the MultiversX side for the MultiversX-Ethereum bridge. For setup details, take a look [here](docs/setup.md). Documentation for relayers can be found [here](docs/relayer.md).  \n\nAlthough cryptocurrency is the future, there are still many challenges to overcome. One of them is providing an easy way to manage multiple different types of coins. Although we already have some exchange services, they can be a bit difficult to use and require many steps to perform the actual transfer, and they require you to trust a centralized third party and/or a centralized ERC20 token smart contract. With this suite of smart contracts, we aim to provide a decentralized way of transferring tokens between MultiversX and Ethereum.  \n\nFor this to be truly decentralized, we're using a multi-sig smart contract. More info on that [here](https://github.com/multiversx/mx-sdk-rs/blob/master/contracts/examples/multisig/README.md).  We're going to have a set of relayers that validate the transaction. You could think of it as a mini-blockchain, whose sole purpose is to handle cross-chain transactions.  \n\nTo be able to transfer the tokens, we make use of a concept known as \"Wrapped Tokens\". You don't transfer native EGLD or ETH tokens, but instead, you lock the native tokens in a contract and generate \"Wrapped\" versions of them. On MultiversX, we are going to use ESDT for this purpose. On Ethereum, we're most likely going to use something like ERC20.  \n\nNow you might ask, how is this any different? There already is an ERC20-style contract on Ethereum for EGLD! The main difference is you won't have to go through exchange services at all, and at some point, we'll likely have this integrated fully into our xPortal application. And there's one more important difference: This is decentralized. There isn't a single contract owner doing all the work.  We have a set of trusted accounts that will handle the transactions.  \n\nBut why should _you_ trust them? We use the \"Proof of Stake\" concept: each of them will have to stake a certain amount of EGLD to be able to become a relayer, just like validators on the MultiversX blockchain. If any of them misbehaves, their stake will be \"slashed\" and they'll lose quite a bit of money as a result.\n\n## Wrapped Tokens\n\nAs said above, we're going to use ESDT to implement wrapped tokens, but how is the wrapping done? For that, we have the `EgldEsdtSwap`, a very simple SC, whose only purpose is to exchange 1:1 native eGLD to WrappedEgld ESDT tokens. You can also do the reverse operation at any time, which is known as unwrapping.  \n\nOne important thing to note is you can never unwrap your WrappedETH while on the MultiversX blockchain, as that is not a native MultiversX token. You will only be able to unwrap them by transferring them to one of your Ethereum accounts and then unwrapping them there.  \n\n\n## MultiversX -\u003e Ethereum transaction\n\nTo be able to send EGLD to an Ethereum account, we first have to wrap the tokens through the `EgldEsdtSwap` contract.   \n\nThen you can create a transaction by making a smart contract call to the `EsdtSafe` SC with the tokens you want to transfer and the receiver's address. The tokens will be locked in the contract until the transaction is processed. If the transaction is successful, the tokens on the MultiversX side will be burned. If the transaction fails for whatever reason, you will get your tokens back.  \n\nNote that not all tokens will be transferred, part of them will be deducted for transaction fees.  \n\n## Ethereum -\u003e MultiversX transaction\n\nTo be able to transfer your tokens back, you will likely have to use an ERC20 contract on the Ethereum blockchain. Once your transaction has been processed on that side, our relayers will simply transfer the tokens back to your MultiversX account, through the `MultiTransferEsdt` SC. No additional fees have to be paid for this kind of transaction.  \n\n## Conclusion\n\nAnd that sums up the MultiversX-Ethereum bridge. It's open source, so if you're interested in the details, you can always check out the implementation. In the future, it will likely be implemented in xPortal, so it will be very straightforward to move your tokens around :)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiversx%2Fmx-bridge-eth-sc-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiversx%2Fmx-bridge-eth-sc-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiversx%2Fmx-bridge-eth-sc-rs/lists"}