Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artemii235/etomic-swap
Etomic Swap Smart Contract allowing ETH and ERC20 atomic swaps on AtomicDex platform.
https://github.com/artemii235/etomic-swap
atomic-swap atomicdex atomicdex-platform eth komodo solidity
Last synced: 22 days ago
JSON representation
Etomic Swap Smart Contract allowing ETH and ERC20 atomic swaps on AtomicDex platform.
- Host: GitHub
- URL: https://github.com/artemii235/etomic-swap
- Owner: artemii235
- Created: 2018-01-10T14:37:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T20:11:14.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T01:11:25.406Z (9 months ago)
- Topics: atomic-swap, atomicdex, atomicdex-platform, eth, komodo, solidity
- Language: JavaScript
- Homepage: https://atomicdex.io/
- Size: 389 KB
- Stars: 37
- Watchers: 5
- Forks: 19
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Etomic Swap Smart Contracts for BarterDex platform.
[![Build Status](https://travis-ci.org/artemii235/etomic-swap.svg?branch=master)](https://travis-ci.org/artemii235/etomic-swap)
Etomic swap Smart Contract is implemented to support ETH and ERC20 atomic swaps on BarterDex platform.
Please note that this project is not production ready yet!## Swap workflow
Smart Contracts follow standard symmetric Atomic swap protocol.
Despite example shows swap of ETH/ERC20 this approach will work also for ETH/ERC20 swaps to any currency supporting HTLC (https://en.bitcoin.it/wiki/Hashed_Timelock_Contracts).1. Bob wants to change his 1 ETH to Alice 1 ERC20 token.
1. Alice sends dexfee (handled externally by client side).
1. Bob sends payment locked with hash of the Secret. He can refund the payment in 4 hours.
1. Alice sends payment locked with Bob Secret hash. She can refund her payment in 2 hours.
1. Bob spends Alice payment by revealing the secret.
1. Alice spends Bob payment using revealed secret.## Project structure
1. `contracts` - Smart Contracts source code.
1. `test` - Smart contracts unit tests.## How to setup dev environment?
1. Install docker.
1. Run `docker-compose build`.
1. `cp .env.empty .env`.
1. Start containers `docker-compose up -d`.
1. Install project dependencies: `docker-compose exec workspace yarn`.
1. To run tests: `docker-compose exec workspace truffle test`.## Related links
1. Komodo platform - https://www.komodoplatform.com
## Useful links for smart contracts development
1. Truffle suite - https://github.com/trufflesuite/truffle
1. Ganache-cli (EthereumJS Testrpc) - https://github.com/trufflesuite/ganache-cli
1. Zeppelin Solidity - https://github.com/OpenZeppelin/zeppelin-solidity