{"id":23114125,"url":"https://github.com/jcserv/atomicswap","last_synced_at":"2025-10-13T02:45:15.388Z","repository":{"id":105773448,"uuid":"174625714","full_name":"jcserv/AtomicSwap","owner":"jcserv","description":"An Atomic Swap protocol allowing users to safely exchange ETH and Aion, created at ETH U of T earning top 6 projects overall.","archived":false,"fork":false,"pushed_at":"2019-03-10T13:26:41.000Z","size":18181,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T00:29:14.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcserv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-03-08T23:37:48.000Z","updated_at":"2019-08-31T00:12:36.000Z","dependencies_parsed_at":"2023-06-13T19:00:38.834Z","dependency_job_id":null,"html_url":"https://github.com/jcserv/AtomicSwap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jcserv/AtomicSwap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcserv%2FAtomicSwap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcserv%2FAtomicSwap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcserv%2FAtomicSwap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcserv%2FAtomicSwap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcserv","download_url":"https://codeload.github.com/jcserv/AtomicSwap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcserv%2FAtomicSwap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014020,"owners_count":26085347,"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-13T02:00:06.723Z","response_time":61,"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-12-17T03:19:25.777Z","updated_at":"2025-10-13T02:45:15.361Z","avatar_url":"https://github.com/jcserv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Atomic Swap between AION and Ethereum\n\n## 2-way Party Atomic Swap Protocol\n\nThe atomic swap protocol allows two parties to exchange assets on two different blockchain in a securely manner such that either the ownership of assets are both changed or both would remain the same.\n\nThe protocol is detailed below:\n\nParty A, Party B, Note that contract `cA` and contract `cB` may be on separate blockchain.\n\n1. Party A, Locally, generate secret `s` and its hash `h` = hash(s).\n2. Party A, talk to blockchain, create conrtract `cA` with `h`, `sender A`, `recipient B`.\n3. Party A, talk to blockchain, send funds to the contract.\n4. Party A, through internet, tell Party B: `h` and address of the created Contract `cA`\n---\n5. Party B, talk to blockchain, make sure the contract `cA` is created with `h`, `recipient B` and if the fund is enough.\n6. Party B, talk to blockchain, create contract `cB` with `h`, `sender B`, `recipient A`.\n7. Party B, talk to blockchain, sends funds to the contract.\n8. Party B, through internet, tell Party A the address of the created Contract `cB`.\n---\n9. Party A, talk to blockchain, make sure the contract `cB` is created with `h`, `recipient A` and if the fund is enough.\n10. Party A, claims fund by submitting secret `s` to contract `cB`.\n11. Party B, claims fund by submitting secret `s` to contract `cA`.\n\nIf either party does not confirm, then funds are returned.\n\n## How we built it\n\nThe project consists of 3 main parts:\n1. The smart contract on Ethereum\n2. The smart contract on Aion\n3. An interface that connects to both blockchain.\n\nFor users to have a better experience, \nall transaction and queries to the blockchains, including deploying smart contracts during the protocol, will go through the two Wallets and would thus minimize users' hassle of managing keys.\n\nWe built the interface such that the users will not need to know how to deploy the contract to run the protocol.\n\n## Challenges we ran into\n\nThe main issues we ran into were with integrating the two systems of the two separate blockchains and realizing that things that work for one may not work for the other. For example, we were stuck for a while on how to generate ABI from our AVM code, however there is no ABI generator currently.\n\nSecondly, we failed to deploy contracts programmatically with the latest version of web3.js. We later found out that this seems to be a known issue on the 1.0.0 pre-release, and decided to roll back to older version of web3.js.\n\nLastly, a few hours before the deadline, the aion testnet went down.\n\n## Accomplishments that we're proud of\n\nWe are proud to have completed a set of smart contracts that would work exactly as our specification, along with an user interface that hides the contract deployment process from the user within the timeframe of the hackathon and despite the obstacles we have faced.\n\nTeam members: Martinet Lee, Dmitriy Strizhkov, Jarrod Servilla\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcserv%2Fatomicswap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcserv%2Fatomicswap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcserv%2Fatomicswap/lists"}