Pre-Requisites
The Murabaha Aggregator/OrderBook and settlement Layer can be viewed as a smart contract based ‘Wakeel / Agent’ that facilitates the activity between Liquidity Providers/Pool Depositors wanting to facilitate Murabaha in return for a profit and the Murabaha takers wishing to receive financing. In V1, to source the best price when executing Murabaha transactions, the Murabaha Aggregator uses a Third party DEX Aggregator to source various on-chain liquidity sources.
Gas Cost: Is the cost of broadcasting a transaction to the blockchain. In the case of Murabaha the transaction the Murabaha Aggregator/Order-Book needs to execute a broad set of logic. On chains like Ethereum the Gas cost may be high for such an undertaking. Ethereum has the most liquidity and can facilitate larger Murabaha transactions albeit at a higher gas cost than other chains.
Swap Fees: In V1 the Murabaha Aggregator/Order-book sources available liquidity from existing on-chain sources using Paraswap. These sources are usually third party DEX’s that have swap fees. Such fees are outside of any fees charged by AZKA and are already baked into the quote provided by the third party DEX aggregator.
Price Impact: refers to the difference between the price obtained from a swap with regards to specific pair compared to the global market price for that pair. As the size of the Murabaha transaction increases compared to available on-chain liquidity, the price impact increases. It is important for all Murabaha Takers to assess the maximum price impact they can bear such that the total debt + costs is feasible.
Slippage: refers to the change in price caused by external broad market movements (unrelated to your swap), while Price Impact refers to the change in price directly caused by your swap. The Murabaha taker may or may not experience this slippage. It is very difficult to predict prior to the transaction being submitted. Murabaha Takers can set their own slippage tolerance and the Murabaha Aggregator/order book will provide a default value of 0.5%. A taker requesting Murabaha can expect to receive no less than requested amount minus the slippage tolerance. If the taker sets slippage tolerance of 0% such that the ‘Amount Received’ is equal to what is quoted by the DEX aggregation layer, the transaction could revert due to the price changing after the transaction is broadcasted. If there is a significant change in price due to external broad market movements then the default slippage value may also not be enough to cover the change. This would lead to the transaction reverting. Although this is rare and the default value is usually more than enough to cover this possibility, it is still a possibility that the transaction could revert. The other option would be to set the slippage tolerance higher. This could lead to front-running/sandwich attacks, where the attacker places a larger transaction before and after the user’s transaction such that they drive the price of the transaction higher and extract the difference in value. Since the user’s slippage tolerance is high, the sandwich attacker can effectively extract that much value from the attack. This type of behaviour is referred to as MEV (Miner extractable value).
Last updated