

Composability Labs
484 posts

@compolabs
Enabling composability one block at a time Ξ | Creators of @v12trade | https://t.co/pdGKLusW7N






New Stickers on @compolabs (@Sprkfi) 🤩 👨💻Join our Trading Force! Spark - your user-friendly #DeFi super app on @fuel_network. 🧡💚💙We are waiting for you - discord.com/invite/composa…









Hi everyone, I have prepared a quizz! It will be with @compolabs the team behind @Sprkfi. I've recently speak about this project and believe me, they are cooking for real! 👀 If you wanna show your knowledge about video-games, we are waiting for you! See details below 👇

Why we invested in Spark ⚡ @Sprkfi brings on-chain order books to life. While Automated Market Makers (AMMs) introduced a new DeFi primitive that operates without relying on any centralised entity, they still lag in transaction throughput, suffer from high slippage costs and complicate liquidity provisioning. Spark is building a new type of Central Limit Order Book engine (CLOB) on-chain. CLOBs, which are the backbone of centralized exchanges, allow traders to plug orders into a universal engine, and execute trades at predetermined prices. This model, widely adopted in TradFi supports market makers who can supply liquidity with algorithmic trading bots capable of analyzing and executing complex strategies. While some DEXs like dYdX use a CLOB mechanism, they rely on validators maintaining off-chain order books using databases such as Kafka and Redis. This architecture allows for millions of open orders off-chain and efficient on-chain execution post-matching, but it involves significant off-chain components, raising concerns about transparency and decentralization. Spark stands out by leveraging the @fuel_network, a rollup 'operating system' for Ethereum with its custom language, @SwayLang. Fuel uses a UTXO-based approach, similar to Bitcoin, enhancing performance and minimizing state bloat with a new primitive - the Predicate. The Innovation of Predicates A Predicate in the Fuel ecosystem is a UTXO that can be unlocked by any input satisfying its conditions, similar to how Bitcoin UTXOs can be spent using a private key. On-chain, a predicate looks like an address, similar to an Ethereum addresses. Users can send and receive coins from a Predicate address just as they do with Ethereum addresses. However, unlike Ethereum addresses, a Predicate address is derived from the hash of its bytecode, not a private key. Creating a Predicate involves writing its contract code and using a compiler to generate a code hash, which is then published on-chain. The conditions of a Predicate can range from simple digital assets to complex smart contract logic. Any transaction that satisfies the conditions of the Predicate can spend the asset. Predicates are not 'deployed' onto the blockchain in the traditional sense. Instead, only the hash of the Predicate code is 'deployed' on-chain, reducing the need for on-chain storage and preventing state bloat. Additionally, txs interacting with Predicates must declare any other Predicates they touch, enabling parallel execution and boasting a high throughput of over 50k TPS. How Spark DEX Utilizes Predicates A typical order on Spark's DEX looks like this: 1. Maker Defines a Predicate: An order maker defines a Predicate function with the condition that he's willing to sell 1 ETH at $3000. 2. Order Publication: The order, now represented by the Predicate address, is published on-chain. The details of the Predicate function (conditions) are available on Spark's DEX for potential order takers. 3. Order Execution: A trader evaluates the Predicate conditions and prepares a transaction meeting the conditions, sending $3000. 4. Token Transfer: The Fuel VM checks if the Predicate returns True, and tokens are transferred. The old predicate is destroyed and a new predicate address is generated which only the trader can spend. The taker receives 1 ETH, and the maker receives 3000 DAI. Advantages of Spark's DEX Model ⚡Efficiency - Txs declare which UTXO's they touch beforehand, enabling parallel execution by validators with multi-threaded nodes. ⚡Scalability - Only Predicate hashes stored on-chain minimizing state bloat. ⚡Automation - Predicates can include bounties for relayers to pick up txs and execute them whenever a time/value condition is satisfied. ⚡Privacy - Order makers can share orders with other institutional clients who can verify the Predicate hash. Spark is pioneering a fully on-chain, efficient, and secure order book system that revolutionizes how DEXs operate. They are currently in the testnet phase with plans to support spot, perps, leverage and lending soon. Go trade at sprk.fi!




Time for some fun this week! Rules are simple: 1⃣Create meme on topic of trading, liquidation, leverage etc and combine it with Spark in a creative way. 2⃣Post your meme in the #memes channel on our discord. 3⃣Profit 😁 You have until Monday, 20th May 2024 15:00, you are free to submit as many memes as possible. Have fun!



