Investor Information

Strategic roadmap

As we are just at the start of our journey, there are a lot of challenges ahead that need to be solved along the way. Here we would like to summarize the next steps that lie ahead:

Video Text transcription

Welcome to Dr token swap contract guide. In this guide we’re going to walk through token swaps, how to create a token swap, what token swaps are and why they’re important.

Firstly, a quick rundown on token swaps: In downtown they are a trustless swap between two parties where the originating party instantiates a contract to swap one token for another token and the counterparty funds their half of the contract and the contract acts as an escrow in between the two parties. When both parties have paid their share, the contract distributes the tokens to both parties. In the meantime, either party can cancel or withdraw from the token swap contract and get their funds back.

In this example, we’re going to do a swap between the ramadau and my Rama wallet. We’re going to do that by initiating a new proposal where we’re going to do a token swap between ramadower and run for Pepe.

In our actions category, we’re going to go to Dao treasury, scroll down, and we’ll find a token swap. Pretty straightforward – what we’re going to do is perform a token swap between one hour. This can be done from an individual wallet, and I’ll show this shortly.

Essentially what we’re going to do is put/paste in our counterparty wallet address (ignore the pop-up). Counterparty wallet address, the tokens that we would like to receive from our counterparty. In this instance, we’re just going to do you know 0.1 Juno. That way we can check my wallet and I’ve got a 4.4, so we’ll see that’ll go to 4.3.

What we’re going to send in this particular demo, we’re going to send a million Pepe. By creating this as the Dow, we’re going to instantiate the Token swap contract. When we execute the proposal, we’re going to fund our half of that contract. Then we’ll go to the Rama wallet where we’ll fund the counter half.

At the moment, because we haven’t published and executed this proposal, all we’ve done is created a contract. Maybe what it will do here is we’ll just go to minscan really quickly, paste in the contract address, and give that a moment to load. We can see here that there’s no funds currently in the contract at all, and eventually might just need a little bit of time for the indexer. We’ll revisit that, we’ll publish this and fund outside of it.

What we’re going to do is pass this proposal, fund our 1 million Pepe into this side of the contract. Excellent. Over yes, and we do need to provide this contract address to the counterparty, so I’ll quickly click this and copy it and see that that we’ve got the tick there to say that I’ve copied the contract address.

Fantastic, pass another another transaction, wait for our execution to occur, and our contract should exist. Excellent, we have a transaction says our contract should exist, and there we have it. So this is on mint scan, I’m not going to go into this in too much detail, it’s probably a little bit confusing, but this is just verifying that we have a token swap contract between counterparty one for a million Pepe and counterparty two for point one Juno.

Fantastic, uh we can see that we’ve paid our 1 million Pepe into from the Dow half, and now we’re waiting for Rama to pay his side. So we’ll click on the me page, this will take me to the transaction Builder again. Ignore the pop-up, I don’t know why my antivirus does it. Uh we’ll go to transaction Builder, we’re going to fund an existing token swap, paste in the address, click continue, and we can see here that this is currently unpaid.

What I will very quickly do here is I’m just going to go back to the Rama Dow, open up a new tab, probably get another pop-up here, that’s perfectly fine, we’ll continue. We’ll open up a new proposal, and I just want to show you the withdrawal of the token swap. So again actions Dow treasury withdraw token swap, we can come in paste our contract address, click continue, and what this will do is if we pass this proposal, it’ll refund our 1 million Pepe because Rama hasn’t paid his side.

So the tokens haven’t been swapped, and either party can do this before the actual execution. So um just wanted to add that in there that you can cancel it, you’ll get your tokens back, super safe, and I really really like it. But just back on the me page, we’re going to pay our 0.1 Juno. So we’ll just execute this uh from the Rama side, fund 0.1 Juno, and when the transaction goes through, we’ll see that 4.3 and we’ll go back to the ramadour look at the treasury, scroll down, and now there’s zero Pepe in there.

So we can see that we’ve just done a trustless uh token swap between two parties. We’ll paste in our contract address again, says it’s unpaid that’s untrue, but there we have it. There we go, blockchain’s finally updated. You’ve already sent you a share of this token swap contract is closed, both parties have paid their portion, and that is data token swaps. See you on the next one.