Introduction: An easy way to offer swap between tokens, valid for EOSio (antelope) blockchains.

With support of PomeloGrants

Github repo:

Use cases

This contract offers the possibility of exchanging fungible items in video games (backed by tokens), this can be represented with several examples such as the exchange of "10 Apples for 1 apple juice" and vice versa this exchange can be executed in the game processed on the network itself.

It also offers the possibility to acquire special tokens like "fornitebuks" in web3 games in exchange for any token that is required.

As another example of use not focused on web3 gaming, it also allows the exchange of tokens for projects that wish to offer their tokens to users in exchange for other tokens on the chain.

How it works

As a contract administrator you will be able to run an action that will allow you to configure a swap option with a unique identifier.

In this action you will be able to configure fields such as, the token contract you want to offer and the amount of tokens on one side and on the other side how many tokens you expect to receive for the amount of tokens and from which contract.

You can make different configurations with different ratios according to your needs.

Example 1: 1EOS = 10Gold , 5EOS = 50 Gold , 10 EOS = 100 Gold Example > 2: 1EOS = 10Gold , 5EOS = 60 Gold , 10 EOS = 150 Gold

Users will only need to make a standard transfer to the contract and will instantly receive the counterpart.

Last updated