šØāš»Technology
šŖ Conditional Tokens
The ConditionalTokens contract is responsible for storing conditions as ERC1155 tokens, which are backed by ERC20 collateral tokens. These tokens represent one position or one possible outcome for an event, and whenever funders fund markets or users buy or sell positions, the amount of tokens for a particular user and position ID is increased or decreased. Rather than using Gnosis Conditional token which is quite outdated and gas expansive, we implemented our own conditional tokens.
The oracle is the only entity capable of resolving a condition or adjusting fair prices of markets. The oracle's address is specified when the market is created and cannot be changed afterward. It is possible to create conditions with different oracles, as indicated by the formula above.
š Market Creation & Resolution
There exists a market maker factory that governs all markets where the market maker factor and markets are all smart contracts. We use our own conditional tokens contract for prediction markets. We trigger the market's deployment to the blockchain and help settle smart contracts by adding game results ourselves.
āļø AMM for determining the odds
UBET AMM (UAMM) is an automated market maker that calculates prices based on considering external market prices and the impermanent loss of the liquidity pool. Despite relying on external market prices, our method maintains the desired properties of a constant product curve in computing slippages.
Impermanent loss is a phenomenon that occurs when a liquidity provider (LP) deposits assets into a decentralized exchange (DEX) pool. It happens because of the fluctuation in the price of the assets being traded in the pool. As a result, the LP's holdings of each asset are worth less than they would be if they had simply held them in their wallet. This reduction in the value of the LP's holdings is called impermanent loss.
Unlike Uniswap, UAMM is designed such that it minimizes impermanent loss which is reflected in the odds. And yet, it provides good odds when there is no impermanent loss to bettors!
Last updated