White Paper 1.1
1. Abstract
MetalSwap is a decentralized platform that allows hedging swaps on financial markets with the aim of providing a coverage to those who work with commodities and an investment opportunity for those who contribute to increase the shared liquidity of the project. Allowing the protection for an increasing number of operators.
At the moment, financial swaps are the most widely used "insurance" tool for large-scale exchanges of raw materials such as metals, but everything takes place on centralized markets that require financial hedge and bank credit lines that are not always accessible to all and with "restrictive" bureaucratic times.
With the concept of an economic incentive, given by the distribution of the governance token ($XMT), the system will have publicly accessible pooled liquidity. Through a set of "smart contracts", initially written on Ethereum, the contracts will make it possible to execute swaps without the need for intermediaries, at reduced costs and without time restrictions.
2. Background
Issues of the current commodities supply system
- Erosion in profit margins due to persistent demand for purchasing efficiency improvements. Commodity consumers put pressure on their producers in order to have an always more competitive price, this constant pressure reduces producers' profits.
- Excessive price volatility: Excessive volatility is detrimental to proper planning and prevents from securing a determined profit. To overcome the inconvenience, financial hedge is required, but this can take hours, if not days. As market prices move quickly, even a few hours of latency can represent a significant loss of profit. (Not to mention if the hedge arrives after several days as often happens in this sector)
- Commitment to purchase volumes “without security": Buyers of raw materials are forced to place orders significantly in advance of scheduled supply, with no guarantee that demand will remain the same… Consider the following example: a chair manufacturer who sold 2,000,000 pieces the previous year needs to order metal for the legs of the chairs and does so under the assumption that he will sell 2,000,000 pieces again this year, but no one can guarantee that this will happen. The manufacturer still has to buy the metal in advance to make sure he can satisfy the demand for the chairs.
Not having enough metal to satisfy the entire demand would cause double damage:
- on the one hand, the manufacturer earns less
- on the other hand, he loses customers who are forced to switch to competing suppliers
What happens if the manufacturer does not sell 2,000,000 chairs this year?
If he were to sell less than 2,000,000 pieces this year, he would have metal in stock that could have been purchased at a higher value than the current price, and this would force him to take a loss. Conversely, if he were to sell 3,000,000 chairs, he would have to purchase additional metal, which might have increased in price so significantly that he would be forced to sell the chairs at a loss or with minimal profit.
Request for price adjustment in case of fluctuations exceeding 10%
In the cases described above, the chair manufacturer may find himself "forced" to charge his customers a much higher price than the one agreed upon in order to be able to procure metal (which has heavily increased in price)
The traditional Centralized Finance solution
Traditional finance attempts to solve its problems through the tool known as "commodity swap".
The commodity swap is a contract between two parties that aims to set the price of a certain commodity. The functioning of this tool is similar to that of a normal swap:
once a notional capital is established, buyer and seller agree to make periodic payments to each other, the first party based on a fixed parameter, the second party based on a variable parameter that reflects the price trend of the underlying commodity.
Commodity swaps were introduced in the mid-1970s to allow producers and consumers to hedge price risk in certain markets.
Indeed, the consumer typically pays the "fixed leg" of the swap to hedge against a potential price increase, while the producer pays the "variable leg" to hedge against any decrease.
The elements that characterize a swap include:
- the notional capital of reference,
- the stipulation date of the contract,
- the duration of the swap.
The volume of commissions, generated by financial hedges inherent to commodities, was more than a Billion in 2019, speaking exclusively of the LME (London Metal Exchange) volume, which is only one of three major actors in this sector ( the other ones are the CME and SHFE).
DeFi is constantly growing and attracting an increasing amount of capital allocated to the various protocols that act as combinable LEGO® bricks.
(Technically this is referred to as TVL).
As a first step, it would be sufficient to acquire even a very small slice of this market, to have a huge decentralized volume and to show the convenience of MetalSwap.
CeFi Issues - The centralization problems
Current centralized systems suffer from significant drawbacks:
- Costs: The intermediation system has structural costs (such as office space and employees), which are reflected in the commissions the trader pays to open financial hedge positions.
- Trust: Funds are entrusted to the centralized service that allows the opening of positions. An act of trust is required towards the service provider and the effective guarantee behind it.
- Monopoly: Market analysis reports the centralization of operation volumes in a narrow group of brokers, which is configured as a monopoly and results in the imposition of costs dictated by a few players who set the price at their convenience.
- Need for bank coverage: The current system requires bank coverage. As mentioned above, this translates into the need for an additional level of trust. It should also be considered that the lack of access to a banking network in some areas, such as Africa, creates a severe accessibility barrier to traditional financial instruments. It should not be forgotten the segment of the world's population that PHYSICALLY does not have access to financial systems because of political restrictions.
- Access to hedges is allowed only in specific time intervals: The market operates on an ongoing basis, but not the offices. An operator in Asia could be "forced" to follow office working hours in time zones as distant as London or Chicago, headquarters of the main markets.
The benefits of MetalSwap, DeFi's solutions
The issues expressed above and related to a CeFi (Centralized Finance) context, find their natural resolution with MetalSwap, developed on a DeFi (Decentralized Finance) system.
- Costs minimized: The commission costs charged on the operation of hedging swaps for trading derive from the cost of the work performed by the financial intermediary: the broker. In MetalSwap there is no need for an intermediary, it is entirely based on blockchain technology through the use of smart contracts.
- Trustless: Since there are no intermediaries, there is no need to trust anyone. The funds are not entrusted to a third party, they remain available in your wallet and you decide how to manage them.
- Decentralization of the system: The issue of monopoly is overcome by MetalSwap's intrinsic automatism and by decentralized finance.
- No need for bank coverage: Bank coverage is no longer necessary: MetalSwap solves this issue with a shared liquidity pool system, where each participant (Liquidity Provider - LP) is rewarded for their contribution through the provision of project governance tokens (XMT). Through XMT, it is possible to propose and/or vote on propositions to expand the project. MetalSwap allows you to open hedge positions only if they can be counter-guaranteed by liquidity pools. That's why in MetalSwap trust is not necessary, it is an entirely and mathematically trustless system.
- Market open 24/7: Unlike traditional offices with their constraining hours, MetalSwap is open 24 hours a day, 7 days a week.
3. Decentralised swaps
How traditional commodity swaps work
- You need to find a bank that deals with this type of instrument.
- You need to call that bank and ask if they will be kind enough to trust you with the amount needed to cover your needs.
- Assuming the bank does (let's not talk about timing), you have to request cover for the specific contract you are struggling to close.
- You have to wait for the bank to give you an answer.
- You have to sign the conditions that are IMPOSED on you in paper form.
- The day you want to close the file, having fulfilled the supply contract, you must return to the bank.
- You have to make the request to close the file.
- You have to wait "confidently" for sustainable closing conditions to be established.
- When you accept the IMPOSED conditions despite yourself, you have to wait for the bank's "technical" time.
- Finally, you can do the maths and find out the economic result of the operation (which could also be NEGATIVE).
How traditional commodity swaps work
- Open the WebApp.
- Choose the economic result you want to achieve.
- Do everything in complete autonomy.
Technological goals
The MetalSwap project aims to implement the financial operation of swaps between two assets through a decentralised IT structure on Blockchain technology.
Specifically, use is made of the ability to execute code in a distributed manner, offered by certain Blockchains, for the operation of programs (Smart Contracts) that implement swaps between crypto assets.
The assets being swapped change from
The basic operation of the swap remains the same as in financial markets outside the Blockchain ecosystem but the efficiency is increased.
In MetalSwap it is also envisaged to create synthetic tokens that accurately reproduce the performance of real commodities in the metals and commodities market, on which the created swaps can be traded. The software development timeline envisages an initial implementation of smart contracts on the Ethereum blockchain, before potentially expanding the system to Binance Smart Chain, Solana, Polygon and other blockchains.
Technological architecture overview
The technological architecture of MetalSwap (shown on the following figure) is the result of several incremental iterations of requirements gathering, technical analysis and formalisation according to current industry best practices.
The proposed features will be added incrementally based on the modular technological blocks created previously, in order to give rise to a dynamic ecosystem, quick to respond to changing industry conditions and user needs and agnostic with respect to the connective frontend used to connect to the Blockchain (and therefore modularly or fully integrable into other projects/graphical interfaces).
A number of different technologies are used for:
- Blockchain components (smart contracts, data feed oracles and decentralised exchanges, etc.),
- back end (servers to maintain the context of the web app instance with which the user interacts, server databases, etc.).
- front end (graphical interfaces of the reference sites and web apps)
But this document will mainly focus on the Blockchain elements that constitute the core functionalities of MetalSwap. The decision-making body of the MetalSwap technological infrastructure is a "DAO" (Decentralized Autonomous Organization) control structure consisting of all users in possession of the project token.
The possession of this token gives users the right to take part in votes proposed by other members, where the individual weight on each vote is directly proportional to the number of tokens held.
MetalSwap's DAO has complete control:
- over protocol development decisions,
- over the proposals and implementation of new monetisation models,
- over the distribution of the fees generated,
- over the technological features to be implemented,
- over the creation of new pairs of crypto assets and their liquidity pools.
The MetalSwap project token makes use of the Ethereum Blockchain and adheres to the ERC20 technical standard, it also implements the "burn" function to enable deflationary monetary mechanisms, and has a suite of additional features useful for managing interactions with the MetalSwap DAO.
This token will have a limited supply cap of two billions, and it is not possible to create more money after the initial creation (at TGE).
Swaps are implemented through a series of Smart Contracts running on the Ethereum Blockchain.
These, together with the code of the Smart Contracts of the Liquidity Pools, control all the core application logic of the project.
The pools are fundamental to provide the required liquidity immediately as new swap positions are opened or closed, secured with a certain percentage of collateral.
Users participating in liquidity pools, the "liquidity providers", receive a substantial part of the fees generated by the protocol and are thus incentivised to increase their contribution.
In order to keep track of their movements in the various liquidity pools, once the assets have been deposited on the smart contracts, users receive an ERC20 token representing the liquidity provided for each pool, generically referred to as 'liquidity tokens'.
The liquidity pools are kept balanced against each other with a special on-chain module: the "liquidity balancer".
In order to obtain accurate and timely data for the assets involved in the swaps, blockchain technologies and Oracles-based infrastructures are involved that collect data from various sources, given the physical nature of the metallic assets listed on the exchanges.
For some of the 'swappable' crypto assets, it is sufficient to estimate the price based on trading on decentralised exchanges.
For others, it is necessary to retrieve current prices from data aggregators (Oracles) that collect and analyse the market from NUMEROUS centralised exchanges in order to avoid errors or manipulation.
Technical features in detail
Swap
Ethereum smart contracts related to swaps are in charge of creating, monitoring and closing swaps by interacting with liquidity pools accordingly.
For each swap, certain parameters are defined:
- the "SwapType" indicating the crypto asset pair involved in the swap and the direction in which the swap is being made (e.g. ETH/USDT or USDT/ETH);
- the "state" indicating in which state of execution the swap is (active, liquidated, executed, closed);
- the address of the owner of the swap;
- the initial price of the asset from which the swap starts at its creation, passed by the priceFeed oracles;
- the "targetSize" which expresses the entire economic amount involved in the swap, and is generally not paid in full but only in a precise percentage (see "cover");
- the "cover" indicating the percentage of the targetSize that the user wishes to pay on the smart contract and behaves as a true financial leverage: opening a swap without having the total amount required by the cover, involves a lower allocation of resources, even if the risk of seeing the position liquidated should be carefully evaluated, which can be managed later;
- the "threshold" is the price threshold of the volatile asset of the swap at which the swap is liquidated; it is calculated as a percentage (expressed by the "cover") multiplied by the "targetSize" subtracted or added to the initial price according to the "swapType"; and is modifiable at a later date;
- the "executionTime" reporting the timestamp when the swap reaches its natural closure;
- the "fee" calculated on the basis of the targetSize, the duration of the swap and the Implied Volatility Rate of the volatile asset of the swap; a fixed fee is added to this fee to pay the GAS of the swap liquidators.
As with all DeFi protocols, before completing the swap creation, it is necessary to grant permission to the smart contracts on the addresses used in the swaps.
This enables the movement of various crypto assets from the addresses, and the funding of new swap positions.
Once the allowance is granted (only needed once for each address) the swap is created and the funds placed in the various liquidity pools are allocated.
The swap will have four possible states: active, liquidated, executed and closed.
- Active: Once the swap is created, it is marked as active and can move to the other 3 states. It will remain active until the executionTime, or as long as some cover is remaining, or until the user closes it prematurely.
- Executed: The swap is completed when the specified period expires and payoffs are paid according to the price trend from the liquidity pools. At this point the cover is returned to the user. In the event of a market performance that is contrary to the swap, the amount corresponding to the difference recorded by the cover is deducted and the swap is moved to the liquidity pools. The remainder of the cover, if any, is returned to the user and the swap is concluded, thus executed.
- Closed: The user decides to close the swap before the indicated period, payoffs are paid according to the price trend from the liquidity pools. Penalties for early closure of the swap are paid according to how early the closure was compared to the executionTime, deducting them from the cover the user paid at the opening. If there is no cover available to cover the closing costs, the swap cannot be closed and the user must first refinance it in order to proceed.
- Liquidated: The swap is liquidated if the market variation in the price of the volatile asset in the swap is so large as to erode the entire cover paid (i.e. it exceeds the value of the previously calculated threshold). Liquidity pools retain the cover and the user receives nothing. As soon as the user starts to see a drop in the cover, he has the option of adding a new cover and preventing his swap from being liquidated. If the user decides to increase the cover, he can do so without paying any additional fees, the threshold will be updated according to the new values.
Liquidity pools
Liquidity pools form the store of value that funds MetalSwap's operations.
The liquidity injected into the Liquidity Pools consists of all crypto assets that can be used as underlying assets for swap transactions, and is contributed by users who decide to allocate their assets by becoming liquidity providers (LPs).
As compensation for their service, LPs will receive a certain amount of official project tokens, which can be used for project governance.
In order to guarantee the stability of the swap pairs, the liquidity balancer technology module is used, with the function of maintaining reserves of the various assets at similar levels between pools.
Staking pools
Staking pools are used to incentivise the blocking of project governance tokens by giving rewards to users who choose to participate in these pools.
The rewards are managed with a system of weighted averages that take into account the time during which crypto assets have been allocated in the pool, and the amount of tokens paid in.
At the end of the staking period, fixed at the creation of each pool (e.g. 30 days, 90 days, etc.) the reward in tokens, previously blocked in the pool's smart contract, is distributed, according to the weighted average system.
Other systems in the architecture can be used to increase the various rewards (e.g. Dao voting or the Buyback reward system) of the pools. The accrued reward can be requested via the smart contract function connected to the web app GUI.
Buy-back system
A large proportion of the fees generated by the system will be used for a smart contract system that will buy back XMT tokens from decentralised marketplaces (such as Uniswap).
The buy-back system will help fuel the demand for XMT tokens and, at the same time, add tokens to the various incentive schemes, according to the logic pre-established and/or voted by the DAO.
WebApp
The webApp is the portal that the user uses to interact with the services offered by MetalSwap.
The webApp does not keep any user identification data does not keep any user identification data and only requires the user to login with the web wallet.
All the identification information of the user's operations, including the status thereof, are saved through the address of their wallet directly on smart contract.
When the user is performing operations, for example creating a swap, the webApp sends the data entered in the frontend, directly to a node of the blockchain, thanks to the web3 connector and a series of ad-hoc libraries.
These libraries allow the interaction with the smart contract functions using JSON-RPC calls and prepare the transactions that are then passed to the Web Wallet module.
The user only has to sign the transactions confirming them through the Web Wallet GUI, and then he can comfortably follow the status until the execution is completed.
The webApp is implemented using an open-source and component-based Javascript library, React, with an asynchronous state management via redux paradigm.
Oracles
MetalSwap relies on a number of oracles, devices, or entities that can provide blockchain applications with reliable and timely data from both contexts outside the blockchain and from other blockchain services and markets.
In order to ensure greater system resilience, MetalSwap relies on both two types of decentralized oracles made available by decentralized exchanges (e.g. Uniswap) and those provided by the Chainlink decentralized oracle network.
This allows smart contracts to receive sufficient market data to operate properly and ensure protection from financial exploits.
Liquidation service
The liquidation service performs a fetch from the blockchain network of all active swaps and controls their parameters in order to manage the swap execution and liquidation system.
For example, if a swap runs out of time, the liquidation service will be able to "execute" it and also receive a reward to compensate for the gas spent to enter the transaction into the blockchain.
Anyone can try to close and liquidate the swaps, the checks on the correctness of these executions is managed by the "requires" inserted directly into the smart contracts.
DAO
The DAO constitutes the decision-making body of the MetalSwap project.
It is composed of a series of smart contracts (acting as the main governance token) with which token holders can interface via webApp to vote on proposals and create new ones.
The DAO contract, through cross contract calls, may be able to directly execute the code of other smart contracts (after successful voting).
Proposals that can be created can cover a few predefined categories, with some of them implementable in an automated fashion by the DAO's smart contracts, such as transferring project tokens in order to fund worthy user initiatives in support of MetalSwap, or as funding to support projects and enrolled technology integrations of the MetalSwap ecosystem proposed by users.
Among the types of proposals, it is possible to find ideas about long term or short/medium term objectives, both about MetaSwap features as well as about its technological macro-developments, for example:
requests for new integrations of technological features to ensure compatibility with other ecosystems and/or blockchain markets, or requests regarding the creation of new synthetic crypto assets representing commodities, currently not yet included in MetalSwap.
Holders of governance tokens can express their opinion on the worthiness of the proposals.
The vote has a weight directly proportional to the number of governance tokens held in the owner's wallet.
A forum dedicated to the free exchange of opinions, ideas and suggestions is available to all the community interested in MetalSwap.
Proposals related to requests for the implementation of new technological features will be subject to a technical/legal feasibility study before their actual implementation by staff employed by the MetalSwap Foundation.
4. MetalSwap Tokenomics (XMT)
The purpose of XMT Tokens is to participate in DAO deliberations. They are allocated as shown in the chart below:
Token Info
Ticker: XMT
Name: MetalSwap
Maximum token supply: 2B
Decimals: 18\
Metrics
Founders, team and advisors: 10% of tokens with 2 years vesting
Ecosystem Development: 10% of tokens with 15 months vesting
Seed tokens: 1% of tokens with linear vesting over 1 year
Private tokens: 4% of tokens with 6 months vesting
Treasury: 25% of tokens
Public sale: 15% of tokens (1% IDO)
Rewards and Community: 23% of tokens
Marketing: 2% of tokens
Strategic investors: 10% of tokens
Distribution to early users
XMT Tokens will be initially distributed to early users of the protocol via swap incentives, liquidity incentives, AMM, test-related incentives, and Bug Hunting campaigns.
All incentives fall under the " Rewards and Community" heading, which will be fueled through the token buy-back system explained in this document.
Staking
People who believe in MetalSwap and want to increase the power of their vote can stack their tokens to receive an incentive and increase the number of tokens.
Incentives details
The following is a proposed distribution of "Liquidity incentives" that will be subsequently confirmed or changed based on the DAO voting.
Governance
MetalSwap, through governance tokens, allows project participants to design the future of the project.
XMT Tokens are used to make new proposals and/or vote on proposals that have been made.
To make a new proposal a minimum threshold of governance tokens will be required.
Voting power depends on the amount of tokens held, staked or delegated.
Fees distribution
The foreseen fees are classified into two different categories.
- Swap Fee, generated by the execution of a swap and composed of Period Fee and Settlement Fee.
- Penalties Fee,
-
- exit fee: generated when exiting the pool before maturity;
- swap fee: generated by early termination of a swap contract.
-
5. Token Flow (XMT)
6. Private Sale
In September 2021, the Seed Phase took place which raised 1.018.498 $ , distributing 20.369.960 $XMT namely the 1,02 % of tokens with linear vesting over 1 year
One month later, MetalSwap’s Private sale raised a total of 8.332.526 $ , distributing 83.325.260 $XMT namely the 4,17 % of tokens with 6 months vesting
7. MultiChain
In December 2021, the first DAO proposal was officially published ( https://app.metalswap.finance/#/governance ):
Should $XMT be bridged to BSC?
The proposal was voted on and subsequently approved on 31 December 2021.
Thus, in late January 2022, $XMT landed on BNBChain and in April, on **Polygon Network'**s Mainchain.
MetalSwap's main app has since then had a new Bridge section that allows users to take advantage of Multichain.org's routing mechanisms directly from the MetalSwap app.