$1000
1stPrize
$500
2ndPrize
$500
2ndPrize
$500
2ndPrize
$500
2ndPrize
ARCHIVE

The competition and voting have completed. Winners were determined by the citizens of Lykke City.

  • Days of the project

    Oct 7 - Dec 15, 2016 (68 days)

  • Registration

    Oct 7 - Dec 15, 2016

  • Submissions

    Dec 1 - Dec 15, 2016

  • Voting

    Dec 15 - Dec 15, 2016

Atomic crosschain swap transactions

Lykke is semi-centralized exchange that means that matched trades are settled on a blockchain (Bitcoin or Ethereum). A single trade between two parties is a swap of two kinds of assets between those two parties. See more about Lykke Ethereum integration here Lykke is integrating Ethereum

The following assets can be exchanged:

1. Assets swaps on the Bitcoin blockchain

  • Colored coins swaps
  • Colored coin vs Bitcoin swaps

2. Assets swaps on the Ethereum blockchain

  • Ethereum Tokens swaps
  • Ethereum Token vs Ether swaps

3. Crosschain swaps

  • Bitcoin vs Ether swaps
  • Bitcoin colored coin vs Ether swaps
  • Ethereum token vs Bitcoin swaps

Crosschain swap assumes that Alice transfers asset to Bob on the Bitcoin blockchain and at the same time Bob transfers another asset to Alice on the Ethereum blockchain. Such two transfers should be made in trustless way – swap must be atomic operation (see more Atomic cross-chain trading).

Proof-of-concept for Crosschain swaps is required to be implemented. There are the following scenarios should be covered:

Scenario I. Bob pays first

1. Bob’s transfer on Ethereum is based on a smart contract protected with a hash H calculated from Bob’s secret preimage R. Alice can redeem Bob’s payment only by providing secret R. Bob’s transfer to Alice can be canceled if it is not redeemed by Alice during 48 hours.

2. Alice’s transfer is a bitcoin HTLC transaction that has the following output

  • Bob’s signature and secret preimage R which hashes to revocation hash H

OR

  • Alice’s signature and OP_CHECKSEQUENCEVERIFY <24 hours>

3. Bob redeems the HLTC during 24 hours and reveals his secret R. Otherwise Alice can get her coins back.

4. Alice should redeem Bob’s payment with providing revealed secret R into smart contract. Otherwise Bob can cancel his smart contract payment.

Scenario II. Alice pays first

1. Alice generates secret preimage R and calculates public hash H. Alice transfers assets with bitcoin HTLC transaction that has the following output

  • Bob’s signature and secret preimage R which hashes to revocation hash H

OR

  • Alice’s signature and OP_CHECKSEQUENCEVERIFY <48 hours>

2. Bob transfers assets to Alice using Ethereum smart contract protected with a Alice’s public hash H. Bob can cancel the smart contract transfer if it is not redeemed by Alice during 24 hours.

3. Alice can redeem Bob’s payment by providing secret R into contract. Bob gets smart contract event notification revealing Alice’s secret R to Bob.

4. Bob should redeem Alice’s bitcoin HTLC payment with revealed R during 24 hours. Otherwise Alice can get her coins back. 

Platform preference

Highly recommended that Bitcoin part would be implemented on C# using NBitcoin. Ethereum part would be implemented on C# using Nethereum.

Links

Current version of Ethereum contracts for tradable tokens on Lykke exchange: 

https://github.com/LykkeCity/EthereumApiDotNetCore/tree/master/src/ContractBuilder/contracts

 

Please login using a user with KYC to see this info
Username Registration date Result
December 01, 2016 06:25
November 30, 2016 08:55
December 08, 2016 11:41
November 24, 2016 02:46
December 02, 2016 09:31
November 23, 2016 06:27
November 30, 2016 08:48
November 25, 2016 09:35
November 23, 2016 06:37
December 07, 2016 12:04
December 08, 2016 07:36
November 25, 2016 12:12
November 30, 2016 07:59
Please login to leave a comment
Username reg. and Subm. Date Result Vote

For this project, none of the submitted results matched our experts expectations, so we decided not to award the first prize.

Your Feedback