Stablecoins Minter
Last updated
Last updated
The SC Minter module is the main access point to Geminon's stablecoin and index offering. It allows users to exchange GEX tokens for one of the Geminon stablecoins, and vice versa.
The minting and redemption mechanism is algorithmic. The SC Minter contract always exchanges a value (measured in US dollars) of GEX tokens for the exact same stablecoin value and vice versa. There is no slippage in the operation, only the protocol commission is discounted.
In order to mint a new supply of stablecoin, it is necessary to hand over a number of GEX tokens, . The amount of minted stablecoin, , is given by the expression:
The price of the GEX token, , is obtained from the protocol oracle as the average of the price in all the pools of the network.
The stablecoin price, , is derived from the stablecoin contract being traded. All Geminon stablecoins and index coins have built-in functions in their contracts that allow obtaining their exchange value in US dollars. For more detailed information on how stablecoin prices are obtained, see the following pages:
The process for redeeming stablecoin is identical to that for minting. A quantity of stablecoin, , is given in exchange for a quantity of GEX tokens, , which is calculated with the same expression used for minting:
The formulas described in the previous point for calculating the amounts of minted stablecoin depend directly on the values of the GEX token prices and the coin in question. This makes the contract vulnerable to changes in those prices. Price gouging attacks are the most common in blockchain-based decentralized finance protocols. For this reason, secure pricing sources that cannot be easily manipulated should always be used.
Geminon stablecoins are priced from the Chainlink oracle network, which is decentralized and takes data from external sources, so they are considered completely secure.
The price of the GEX token, on the other hand, depends on the state of the liquidity pools in the network, which is why it is susceptible to manipulation, especially through flash loans. The Geminon protocol incorporates security measures that prevent such price manipulations from being successful:
The price of the GEX token is taken indirectly through the Geminon oracle, which uses the price of the pools at the close of the previous block. This means that flash loan attacks have no effect on the price, since the operations within the current block are not incorporated into the calculation.
The Geminon oracle calculates the price by taking the average of all the GLP. This increases the cost for the attacker, since it is necessary to simultaneously manipulate all the pools.
The GLPs incorporate an algorithm that filters operations with abnormal volume for the calculation of the reference price of the pool.
GLPs entropy capture feature heavily penalizes trades that produce excessive price slippage, making the attack economically unfeasible.
For more detailed information on LPG security mechanisms, consult the dedicated sections:
The SC Minter contract incorporates the same internal security mechanisms as the GLP contracts. For more detailed information, consult the previous section corresponding to GLP safety protocols.