Mega Swapfield

Preamble

Liquidity of an economic value belongs to its both main forming factors and real-time indicators.

Circulation of economic value is formed by supply and demand, if there is no external regulation. Sometimes classic tools used for liquidity regulation appear not to be effective enough. Programmable environment, which itself crypto space technically is, can help gain an extra fine-grained and more explicit control over liquidity in the fields where classic tools may fail.

The main purpose of the Mega Swapfield project is to have such control over liquidity of its tokens (Mega tokens).

The project is intentionally made simple in its core. Its technical basis is designed as constant, immutable and self-adjusting at responding to any possible situation on the market.

With the help of the project, market participants themselves can take part in market liquidity regulation. Though this might seem to be relevant only for small and medium markets, the project still aims to be finally adopted by the large market through the time.

The project was plotted as experimental. But however, it is totally unique and still remains one and the first of its kind, and it creates the unprecedented opportunities for bringing the design of programmable market environment at another higher level.

Unlike an ordinary market which liquidity is self-regulated without such a hard outside interference, Mega Swapfield, at some point, can be considered as a life hack of a very special type. But, like any other market, Mega Swapfield is a part of the global market too, and also its full potential and wide variety of possible use cases are yet to be discovered.

Initially, the project is highly unbiased in terms of economic value to be associated with it onwards, because Mega tokens are just plain tokens which are initially not strictly linked to any economic value except themselves. Also to add, the whole project idea is very new to the market.

That is why the economic value of the project is expected to exponentially (or at least gradually) grow during some period of time required for its assimilation by the market. The more Mega tokens are involved in the market life, the higher is their economic value.

System components

Mega Swapfield consists of 3 components:

MMT and MST can be easily swapped with each other through Mega Swap Fund at the constant swap rate of 1 MMT : 100 MST.

Tokens held on Mega Swap Fund balance can be swapped in and out of it at the constant swap rate. It also guarantees that they are swapped only at the same constant swap rate on any other market (i.e. not only through Mega Swap Fund).

Initially (at the moment of smart contracts deployment), Mega Swap Fund has 1/5 of total supplies of MMT and MST on its balance. As token swap means “give an amount of one token and take a corresponding amount of another token in return”, decreasing balance of one token leads to increasing balance of another token, therefore Mega Swap Fund always has the same whole (MMT+MST) value on its balance.

Token metrics

Mega Merger logo
Name Mega Merger
Type ERC-1363
Symbol MMT
Total supply 500,000,000
Decimals 18
Mega Splitter logo
Name Mega Splitter
Type ERC-1363
Symbol MST
Total supply 50,000,000,000
Decimals 18

Swap Fund

Brief coverage

Mega Swapfield is a system which is both autonomous and fully controllable, and has a simple yet sophisticated mechanism of Mega tokens liquidity regulation. It provides that all Mega tokens in circulation are exceptionally interrelated in terms of their total liquidity.

Its approach consists in dividing the circulating supply into several separate volumes (zones) which are proportionally different from each other in size, and individually regulating each one’s liquidity.

To swap one token with another, you only need to send an amount of one token to Swap Fund address and you will immediately receive the corresponding amount of another token in return. This way to swap tokens is one of the cheapest, and also it is the fastest.

Using our special terms, we also say that tokens sent for swapping are swapped in, and tokens received in return are swapped out.

For example, if you send 123 MMT to Swap Fund address, they are added to its MMT balance, and you get 123*100 = 12,300 MST in return which are subtracted from its MST balance. And, if you send 123 MST to Swap Fund address, they are added to its MST balance, and you get 123/100 = 1.23 MMT in return which are subtracted from its MMT balance.

However, a token swap will be performed only if it does meet the certain conditions which depend on current system values of Swap Fund, otherwise token swap will be cancelled (in such case, your tokens will remain on your balance and not be swapped, because your transaction will be declined by Swap Fund).

Swap Fund logic is based on dividing token balance of Swap Fund address into several volumes (which also significantly differ in size from each other) and independently regulating token swaps through each of them as if they were really separate balances (in fact, they almost are separate). These are virtual balances (or, using our special terms, swap threads, i.e. “virtual balance” = “swap thread”) of Swap Fund.

Swap Fund has 20 swap threads in total. Every swap thread has both MMT and MST tokens.

When you send an amount of Mega token to Swap Fund address, it is added to balance of one of its 20 swap threads, and the corresponding amount of the other Mega token that you receive in return is subtracted from balance of that same swap thread.

Each swap thread has its own Id. A swap thread to swap your tokens is selected depending on amount you send: the more is amount you send, the higher is Id of swap thread which will be selected to swap your tokens. That is, every swap thread swaps amounts that are within its assigned range only.

Since swap threads are not just one but several balances that are separated from each other, each one of them can be emptied faster than the whole token balance of Swap Fund. So, when a Mega token balance of swap thread is zero, obviously no tokens can be swapped out from it (i.e. received from that swap thread in return for tokens sent to it), because it simply has no tokens until it is refilled with any amount of tokens swapped in. This is used for setting limits for maximum token amounts that can be swapped out.

Also, there are limits applied for maximum token amounts that can be swapped in (i.e. sent to a swap thread for swapping with the other token). So, when a swap thread reaches its maximum for a Mega token, no more tokens can be swapped in and added to its balance until its counter for tokens swapped in is reset back to zero.

By using these two methods, swap threads set limits for maximum token amounts that can be swapped in them and out of them, so that Mega tokens are swapped in and out of Swap Fund in proportional volumes at a whole.

Swap thread constants (shown in table)

Swap thread Id Initial value of swap-out counter Maximum value of swap-in counter Maximum swappable in amount
MMT MST MMT MST MMT MST
0 1,028,500 102,850,000 4,114,000 411,400,000 51,425 5,142,500
1 1,178,300 117,830,000 4,713,200 471,320,000 58,915 5,891,500
2 1,349,800 134,980,000 5,399,200 539,920,000 67,490 6,749,000
3 1,546,300 154,630,000 6,185,200 618,520,000 77,315 7,731,500
4 1,771,500 177,150,000 7,086,000 708,600,000 88,575 8,857,500
5 2,029,400 202,940,000 8,117,600 811,760,000 101,470 10,147,000
6 2,324,800 232,480,000 9,299,200 929,920,000 116,240 11,624,000
7 2,663,300 266,330,000 10,653,200 1,065,320,000 133,165 13,316,500
8 3,051,000 305,100,000 12,204,000 1,220,400,000 152,550 15,255,000
9 3,495,100 349,510,000 13,980,400 1,398,040,000 174,755 17,475,500
10 4,004,000 400,400,000 16,016,000 1,601,600,000 200,200 20,020,000
11 4,586,900 458,690,000 18,347,600 1,834,760,000 229,345 22,934,500
12 5,254,700 525,470,000 21,018,800 2,101,880,000 262,735 26,273,500
13 6,019,700 601,970,000 24,078,800 2,407,880,000 300,985 30,098,500
14 6,896,000 689,600,000 27,584,000 2,758,400,000 344,800 34,480,000
15 7,900,000 790,000,000 31,600,000 3,160,000,000 395,000 39,500,000
16 9,050,100 905,010,000 36,200,400 3,620,040,000 452,505 45,250,500
17 10,367,600 1,036,760,000 41,470,400 4,147,040,000 518,380 51,838,000
18 11,877,000 1,187,700,000 47,508,000 4,750,800,000 593,850 59,385,000
19 13,606,000 1,360,600,000 54,424,000 5,442,400,000 680,300 68,030,000

Additional constants of swap thread #0:

Minimum swappable in MMT amount: 0.000000001

Minimum swappable in MST amount: 0.0000001

Swap thread constants (shown in chart)

Swap thread indicators

Total MMT swap-in counter of swap thread

Total MST swap-in counter of swap thread

Period number of swap thread

Global constants

Swap thread count: 20 (numbered from #0 to #19)

MMT:MST swap rate: 1 MMT = 100 MST

Global indicators

Total MMT swap-in counter

Total MST swap-in counter

Global initial values

Initial MMT balance of Mega Swap Fund: 100,000,000

Initial MST balance of Mega Swap Fund: 10,000,000,000

Guide

1. Notes

Mega tokens

MMT and MST tokens are also called Mega tokens.

Swap in, swap out

Token amount is swapped in = token amount is received from external address and swapped with the corresponding amount of the other token (which is sent to external address in return). Token amount is swapped out = token amount is sent to external address as swapped with the corresponding amount of the other token (which is received from external address).

MST swap amount must be a multiple of MMT swap amount.

Mega Swap Fund swaps only exact amounts, it does not round them. Therefore, when it receives any MST amount, it requires that it is a multiple of 100 (because MMT : MST swap rate is 1 : 100).

MMT swap amount must be a multiple of Minimum swappable in MMT amount, and MST swap amount must be a multiple of Minimum swappable in MST amount

This is because maximum token decimal precision used by Mega Swap Fund is 9 decimals only (whereas Mega tokens have 18 decimals). That is, after the 9th decimal place, its interface does not allow swap amounts to have any digits but zeroes. Therefore, since MMT : MST swap rate is 1 : 100, Minimum swappable in amounts are 0.000000001 MMT and 0.0000001 MST, respectively.

Swap-out counter

Counts total token value swapped out, i.e. transferred from Mega Swap Fund address and subtracted from its token balance. Each swap thread of Mega Swap Fund has 2 swap-out counters, that is one per each Mega token.

Swap-out counter of swap thread

Current maximum share of token balance of Mega Swap Fund which swap thread has at its own disposal, i.e. maximum quota that the given swap thread can send to external addresses as swapped out. At its every token swap, swap thread decreases its swap-out counter value by token amount it sends to external address. When a period of swap thread ends, both its swap-out counters are reset to their initial values (Initial values of swap-out counters of the given swap thread).

Swap-in counter

Counts total token value swapped in, i.e. transferred to Mega Swap Fund address and added to its token balance. Each swap thread of Mega Swap Fund has 2 swap-in counters, that is one per each Mega token.

Swap-in counter of swap thread

Current token value received and swapped by swap thread. At its every token swap, swap thread increases its swap-in counter value by token amount it receives from external address. When both swap-in counters of swap thread have reached their maximums (Maximum values of swap-in counters of the given swap thread), they are reset to zeroes, and the current period of the given swap thread ends (and the next period starts at it).

2. Used terms

Initial values of swap-out counters of swap thread

Initial values of swap-out counters of swap thread when its new period starts.

Maximum values of swap-in counters of swap thread

Values of swap-in counters of swap thread that must be reached to start the next period at it. When a swap-in counter of a token of a swap thread has reached its maximum, the given swap thread can not receive the given token anymore. And only when both swap-in counters of the given thread have reached their maximums, they are reset to zeroes, and the next period starts at it.

Maximum swappable in amounts of swap thread

Maximum token amounts that can be received and swapped by swap thread. Based on these constants, Mega Swap Fund selects swap thread to swap received tokens. If received amount is larger than Maximum swappable in amount of swap thread N-1 but less than or equal to Maximum swappable in amount of swap thread N, then swap thread N is selected.

Minimum swappable in MMT amount (of swap thread #0), is 0.000000001 MMT

Minimum MMT amount that can be received and swapped by thread #0. Thus, this is also minimum MMT amount that can be received and swapped by Mega Swap Fund (as thread #0 is the lowest one). If received amount is less than this value then transaction is reverted.

Minimum swappable in MST amount (of swap thread #0), is 0.0000001 MST

The same as Minimum swappable in MMT amount, except it is about MST token.

Total MMT swap-in counter of swap thread

Total MMT token value swapped in by the given swap thread since the moment of Mega Swap Fund creation so far.

Total MST swap-in counter of swap thread

The same as Total MMT swap-in counter of swap thread, except it is about MST token.

Period number of swap thread

Period of swap thread starts at the moment when its swap-in counters of both Mega tokens are reset to zeroes, and ends at the moment when both they have reached their Maximum values for the given swap thread. Right at the moment a period ends at a swap thread, the next period starts at it, and its swap-in counters of both Mega tokens are reset to zeroes. Periods are numbered, thus they are counted (number of every new period is number of its predecessor increased by 1).

Swap thread count

There are 20 swap threads of Mega Swap Fund in total.

MMT:MST swap rate, is: 1 MMT = 100 MST

Swap rate at which Mega tokens are swapped with each other through Mega Swap Fund.

Total MMT swap-in counter

Total MMT token value swapped in by all swap threads since the moment of Mega Swap Fund creation so far. That is, total MMT token value received and swapped by Mega Swap Fund since the moment of its creation so far.

Total MST swap-in counter

The same as Total MMT swap-in counter, except it is about MST token.

Initial MMT balance of Mega Swap Fund

MMT token balance of Mega Swap Fund at the moment of its creation. Is equal to the sum of Initial values of all MMT swap-out counters of all swap threads at that very same moment.

Initial MST balance of Mega Swap Fund

The same as Initial MMT balance of Mega Swap Fund, except it is about MST token.