-
Notifications
You must be signed in to change notification settings - Fork 231
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
Adding Ethereum support #74
Comments
It's not supported because
You're welcome to take this on. Ideally the contract would be reviewed by 3rd parties who have more experience with solidity than I do. |
Well it has already been implemented in solidity by several teams such as altcoin.io (https://github.com/AltCoinExchange/ethatomicswap/blob/master/cmd/ethatomicswap.js ) and republic protocol ( https://github.com/republicprotocol/eth-atomic-swap/blob/master/contracts/AtomicSwapEther.sol ), don't know if it might help. Would be happy to help but I don't use go |
@leoloco not every tool need be written in Go. Each tool is its own program and can be implemented in any language. |
I was planning to write it in Golang, but feel free to help to review the solidity part and high-level logic of ethereum @leoloco once I have a PR available. |
I've performed some tests with a solidity contract mostly inspired by the republic protocol's one. I was using the mist wallet and it appears to work fine (on the rinkeby testnet though). |
Could be useful:
|
A heads-up before you get started: a lot of the code in the ethereum ecosystem is GPL and the code linked above is no exception. I'd however prefer to keep all of the tooling in this repo permissively licensed if at all possible. |
Sure, that is not a problem. Have implemented the atomic swap logic in another chain already, as to support decred for it. So I don't think there is much need, if any at all, to look at the code linked above. |
I am also interested in helping .. especially if Decred are interested .. There is a contract at: . . . which can perhaps be used. The work would be taking jrick's golang front end CLI That is implementing: These calls would interact with the ethereum contract referenced above through transactions signed by the user's wallet. Then any Atomic Swap GUI implementer can use the same calls for ethereum from something like What do you guys think? |
I agree. I think we should update the contract to solidity 4.18 though. |
Maybe 4.21 as that is the start of many new solc safety features |
"The work would be taking jrick's golang front end CLI api and making those work (in golang) with the ethereum client(s) geth, etc. over RPC." @jrick - any thoughts on my proposal above please ... |
For me all look good. If needed I can start working on this by the end of this week, as I'll start to have time for it. If someone else can do it faster, feel free to go for it. Just please make sure if you take it instead of me, that you can deliver it within the next week, as I would like to start playing with it by than. But its free for grabs if you can start working on it already now, and can deliver it within he next few days :) |
No I have no plans to spend time on this at the moment - was asking jrick opinion on which way might be optimal is all .. cheers |
Ah yes! That is very good. The more input the better! |
@devwarrior777 yes, as described in project 1, any tools added should adhere to the same interface. |
I started working on this today, will try to post some results ASAP:
Will already post an intermediate result once I finished (1), as that will be a big part of the core logic for this tool, having someone review it ASAP will help hopefully with the quality. |
For me ; reuse the same contract, but make the functions restricted to withdrawer and sender address. |
If reusing I suppose we should allow an optional flag to reference contract if desired, or not? |
Well, if you want a decentralized matching engine system, then I wouldn’t allow not to reference the contract, so that you can have a decentralized list of open trades for people to find a pair. To my mind liquidity and decentralization comes before a relative anonymity. |
Any thoughts here about formal verification of the smart contract we'll write for this feature in Solidity, using why3? I can't find much up-to-date information about it, so not sure if it is still actively being worked on? I know the solidity ecosystem supports unit tests, using javascript, but I would prefer a formal verification of the to be used contract if possible. Any people who can give some guidance here or have thoughts about this? |
The folks at https://zeppelin.solutions/ do vetting of contracts -- and I have read one of their analyses -- they caught a few errors including an overflow error that was a potential attack vector. It may not be free .. so perhaps Decred would be willing to put up a reasonable bounty for this @jrick once the contract has been updated to solc 4.21 and informally looked at by us here. Great to see many people here |
Added the smart contract, including unit tests, in the following (WIP) PR: #76
|
the
Please review the API differencesAll commands require a running node (with its RPC accessible) except for the The
The |
The |
I used the I request anyone interested in this feature to either review or get some Solidity/Ethereum experts to review this PR as soon as you can. It would be greatly appreciated. |
@GlenDC I am trying to do an atomicswap between BTC and ETH.
|
I'm sure Ethereum doesn't need an introduction, but here are some links anyhow:
Would be implemented using a smart contract, not sure which high level language is preferred, but Solidity seems to be the recommended one since a long time.
I'm willing to put engineering time into this myself in order to make this happen, somewhere next month. However I'm confused to why this chain is not yet supported? Are there strong reasons not to support it? Would be a great addition to this repo I would think.
The text was updated successfully, but these errors were encountered: