Contest proposal: Atomic Swap between Dune Network and Free TON

Contest: Atomic Swap between Dune Network and Free TON

[17 March 2021 - 18 April 2021]

Contest dates

  • Submission period: 17 March 2021 - 18 April 2021

Short description

Develop and deploy a set of smart contracts and service tools, sufficient to perform a one-way atomic swap from Dune Network to Free TON, following the terms of the accepted proposal “Dune Network Community Partnership Proposal” (Dune Network Community Partnership Proposal). Smart contracts and tools have to be developed both on Dune Network (in Love language) and on the Free TON network (in Solidity language).

Motivation

There are two goals in this proposal:

  • Perform Phase 2 of the merge with the Dune Network blockchain and its community
  • Develop a Free TON infrastructure that will be usable for other merges with other networks

General requirements

  • The infrastructure should provide the following features:
    • The infrastructure (smart contracts, tools) should be deployed on the Dune Network mainnet and the Free TON mainnet
    • On the Dune Network part, smart contracts will only be activated under the following conditions:
      • Initial transfer of 24 M DUN, to be vested on the Free TON side (step 1)
      • Validation by admins that the Free TON side is activated (step 3)
    • On the Free TON side, smart contracts will only be activated under the following conditions:
      • Initial transfer of 9 M TON Crystal to be swapped against DUN tokens (step 2). This transfer will only happen when the step 1 has been met on Dune Network
    • Once both sides are activated:
      • Tokens to be vested will be transferred to a DePool contract
      • Dune Network holders will transfer their tokens together with a secret and a destination Free TON address
      • The infrastructure will create a recipient address on the Free TON side with the same secret and the corresponding number of TON Crystal tokens
    • The swap will last until June 30, 2021, at which point all TON Crystal tokens that have not been swapped should become transferable back to their giver, and idem for DUN tokens.
    • A website will make it easy for Dune Network holders to perform all these steps
  • Smart contracts and infrastructure with open source licences published on GitHub/GitLab or another open repository
  • Documentation
  • Name and contact information of the contestant for communication (Telegram username, e-mail)

Evaluation criteria and winning conditions

Hard criteria

Functionality

  • Protection from the unauthorized withdrawal of funds from published contracts
  • The possibility of a safe return of funds to each of the parties if the smart contracts are not activated both ways

Artifacts

  • Link to the website connected to the smart contracts on Dune Network and Free TON, with detailed documentation on how to perform the swap
  • Link to smart contracts’ sources at Github/Gitlab or another open repository, with the obligatory backlink to your submission in the repository’s README

Soft criteria

  • Code quality
  • Detailed deployment and usage documentation
  • Detailed documentation for each part of the code
  • Documentation of the trade process for all parties of the trade

Rewards

1 place…………………………200,000 TONs

2 place…………………………100,000 TONs

3 place………….………………50,000 TONs

4-10 place………………………15,000 TONs

Voting

  • Jury members who vote in this contest must have a solid understanding of the technology. Those jurors who do not should not vote or “Abstain”.
  • Jurors whose team(s) intend to participate in this contest by providing submissions lose their right to vote in this contest.
  • Each juror will vote by rating each submission on a scale of 0 to 10 or can choose to reject it if it does not meet requirements, or they can choose to abstain from voting if they feel unqualified to judge.
  • Jurors will provide feedback on your submissions.
  • Duplicate, sub-par, incomplete or inappropriate submissions will be rejected.

The Jury

  • Jury members who vote in this contest must have a solid understanding of the technology. Those jurors who do not should not vote or “Abstain”.
  • Jurors whose team(s) intend to participate in this contest by providing submissions lose their right to vote in this contest.
  • Each juror will vote by rating each submission on a scale of 0 to 10 or can choose to reject it if it does not meet requirements, or they can choose to abstain from voting if they feel unqualified to judge.
  • Jurors will provide feedback on your submissions.
  • Duplicate, sub-par, incomplete, or inappropriate submissions will be rejected.

Jury rewards

An amount equal to 5% of the sum total of all total tokens actually awarded to winners of this contest will be divided equally between all jurors who vote and provide feedback. Both voting and feedback are mandatory in order to collect this reward.

Procedural reminders to all contestants

  • All submissions must be accessible for the jury to open and view, so please double-check your submission. If the submission is inaccessible or does not fit the criteria described, the submission may be rejected by jurors.
  • Contestants must submit their work before the closing of the filing of applications. If not submitted on time, the submission will not count.
  • All submissions must contain the contestant’s contact information, preferably a Telegram username by which jurors can verify that the submission belongs to the individual who submitted it. If not, your submission may be rejected.
  • The content published in the forum and in the provided PDF file should not differ, except for formatting, otherwise, the submission may be rejected by jurors.
  • If your submission has links to the work performed, the content of those links must have the contestant’s contact details, preferably a Telegram username so jurors can match it and verify who the work belongs to. If not, your submission may be rejected.

Disclaimer

Anyone can participate, but Free TON cannot distribute Tons to US citizens or US entities.

6 Likes

I just posted the proposal I sent in the Telegram Defi group, so that it’s also possible to discuss it here !

So let me get this straight,
you propose a swap, this gets accepted and then you leave it like this in limbo and are dune holders depending on this contest proposal? what if no-one bothers???

1 Like

let’s shorten the time for submission to no more than two weeks!

Explained in the telegram group, but for the benefit of others this contest is designed to keep the development of the swap infra as decentralised as possible (pretty much in the same way all things work on Free TON as I understand it).

This is an important contest! Is it possible to do it 2 in 1, i.e. to add requirement to have Tezos swap as well since Dune is very similar network?

I’m also in favor of a Tezos swap alongside if that’s possible. Ultimately, it’s a great idea to create the template contract for future swaps of the same kind.

That being said, let’s focus on what’s at hand. Completion of network merger. Smart contract activation under a virtual escrow-like mechanism, including vesting conditions for tokens and everything open-sourced. Where’s the downside? It’s basically putting the car in drive after the luggage is securely packed in the trunk and everyone is in the car with their seatbelts on.

The only suggestions are the following:

-Please rewrite the “Jury rewards” part as follows (because right now it is technically incorrect):

Jury rewards

An amount equal to 5% of the sum total of all total tokens awarded to contest winners will be distributed among jurors who vote and provide feedback. This percentage will be awarded on the following basis:

  • The percentage of tokens awarded to the jury will be distributed based on the number of votes each juror casts. For example, if one juror votes 20 times and another juror votes 5 times, the juror who votes 20 times will get 4 times more tokens than the juror who votes 5 times.
  • Detailed feedback is mandatory in order to collect any rewards.

-Is one month for this enough time? Just asking

-The rewards seem awfully high, but this may be simply due to my incompetence of manhour/market value for such work. Seems high, but if I’m wrong please correct me. If I’m right, please adjust accordingly to current talent retention value (please do not use the US or the EU as the SOLE benchmark :grin: Let’s find something in-between. We have plenty of talent in the community).

My two cents

I think that there is a big difference between this atomic swap and a swap with Tezos: in the case of Dune, the tokens are swapped with TON Crystal directly (at a specified rate), whereas for Tezos, the idea would be to have XTZ or other tokens there available on Free TON in TIP-3 contracts. Also, Dune’s smart contract language (Love) is different from Michelson, it is more expressive than Michelson.

In my opinion, it is interesting to have a bridge with Tezos, but it will introduce a delay that I cannot estimate. So, I would really argue to have another contest for Tezos, because this proposal needs to be achieved fast, whereas there is not much DEFI right now on Tezos, so it can still wait a bit more.

For the time and rewards (and most of the proposal), I copy-pasted the proposal on the Ethereum/Bitcoin bridge, so I assumed they were expected to be correct for a similar task.

Thanks for the explanation

Gotcha. Makes sense. UsingSpaceToMakeUpFor20CharactersWhichIsAnnoying :slight_smile: