Alex Nagorny

@defi-defiler

Joined on Jan 17, 2024

  • 1. Perpetual Exchange: Spark Perps docs: https://docs.sprk.fi/ Funding Rate: Investigate how the funding rate is calculated and its impact on traders' positions over time. Matching Engine: Examine the efficiency and fairness of the order matching process. Multi-Collateral System: Assess the flexibility and risk management of allowing multiple types of collateral. Profit and Loss (PnL) Calculation: Evaluate the accuracy and transparency of the PnL calculation process. Liquidation Process: Scrutinize the criteria and mechanism for liquidating positions, ensuring it's fair and timely. Oracle Functionality and Price Manipulation: Investigate the reliability of the oracle system and its vulnerability to manipulation. Insurance Fund Management: Analyze how the insurance fund is managed to cover insufficiencies during trader position liquidations.
     Like  Bookmark
  • Overview This specification outlines the requirements for a predicate indexer for a limit order predicate. The indexer will track and index events related to order creation, cancellation, and fulfillment based on the predicate's logic, tests, and scripts. Predicate Reference Predicate: Limit Order Predicate Source Code: Limit Order Predicate on GitHub Test Suite Location: Local Tests on GitHub Key Tests:create_order
     Like  Bookmark
  • To develop Spark on the Polygon Miden platform, it's essential to consider the unique features and architecture of Miden. Here's a basic plan for the architecture of Spark on Miden: What is Spark and its Purpose Spark is a cross-margin oracle-based perpetual order book exchange. Its key features include a high-performance order book, cross-margin trading, partial liquidations, and an advanced risk engine. On Miden, these features would be adapted to leverage Miden's concurrent transaction execution and enhanced privacy properties. Core Accounts (Contracts) to be Developed on Miden Clearing House Account: This account would handle user interactions for creating positions and manage the logic for funding. Account Balance Account: Responsible for storing information about user positions and PnL. Insurance Fund Account: Functions as the exchange's risk mitigation pool. Perpetual Market Account: The order book account on which the perpetual exchange operates.
     Like  Bookmark
  • Boilerplate contracts Deploy 2 virtual tokens -> BaseToken.sol & QuoteToken.sol Deploy ERC20 Token `const USDC = (await tokenFactory.deploy()) as TestERC20`` Deploy UniswapV3Factory then create a pool `await uniV3Factory.createPool(baseToken.address, quoteToken.address, uniFeeTier)`` /* uniFeeTier = 10000, // 1% */ Protocol contracts ClearingHouseConfig -> no arguments MarketRegistry -> uniV3Factory.address & quoteToken.address 2.1. For each market, we deploy a pair of two virtual tokens (with no real value) and initiate a new Uniswap V3 pool to provide liquidity to.
     Like  Bookmark