CDR #002: EdgeSwap | asset price

EdgeSwap

Developed by Edge Labs, EdgeSwap is an Ethereum-based layer 2 trading protocol that adopts the ZK Rollup technology. With the industry’s top-grade hardware acceleration solution and circuit optimization system, EdgeSwap provides the market with high-performance, cost-effective swapping and farming services. At the same time, it protects users’ assets and privacy through the highest level of security among layer 2 scaling solutions.

Feed usage

Data type: Price feed

Use case: The feed will be used to calculate the asset price

Specifications

Delivery method: API

Update mechanism:

Methodology: MEDIR 10s (adjusted/ based on MEDIR: Median with Interquartile Range Filter - DIA Documentation)

Frequency: 10s

Sources (by chain/version): All available markets

Pairs: BTC/ USD, ETH/ USD

Other relevant information: -

The Layer2 contract is a decentralized perpetual contract deployed on the Layer2 Ethereum network. There is no delivery date. As long as the contract is not liquidated, users can keep it.

Has the following characteristics:

The account adopts two modes of Rollup & Validium: the system registers two accounts by default, displays Validium to the user, and can switch freely between the two. The data under each account is independent, and the positions are independent.

Validium mode: transaction data is stored off-chain, and transaction fees are cheaper.

ZKRollup mode: The transaction data is stored on the chain, and the data can be queried on the chain.

Settled in USDC: Contracts are priced and settled in USDC.

Expiration Period: Perpetual

Funding fees: U-margined perpetual contracts will incur funding fees.

Liquidation price: The liquidation price is calculated using the oracle price.

Maximum leverage: The maximum leverage is 25X, which is subject to the currency pair contract information.

1 Like

Hi! We have prepared the feed for you to get it from here:
https://api.diadata.org/graphql/

There you can enter a query in the following format to get the latest 10s updates on MEDIR prices:

{
  GetChart(filter: "mair", BlockDurationSeconds: 10, BlockShiftSeconds: 10, StartTime: 1648475024, EndTime: 1648475724, Symbol: "ETH") {
    Name
    Symbol
    Time
    Value
  }
}

This will give you an update every 10 seconds (BlockShiftSeconds) of the price of the requested asset (ETH) over the last 10 seconds (BlockDurationSeconds). With StartTime and EndTime (Unix timestamps) you can control your time range for your query. We recommend to use a short time range for better performance of your query.

2 Likes

Hi! We have an update regarding the signatures: With the new retrun parameter “Sign” you can get the signature:

{
  GetChart(filter: "mair", BlockDurationSeconds: 10, BlockShiftSeconds: 10, StartTime: 1648475024, EndTime: 1648475724, Symbol: "ETH") {
    Name
    Symbol
    Time
    Value
    Sign
  }
}