Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion harnesses/perp-fees/cmd/script/edgex.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func fetchEdgex(v VenueConfig) PerpSample {
s.TakerFeeBps = edgexTakerBps

var book edgexDepthResp
url := fmt.Sprintf("%s/api/v1/public/quote/getDepth?contractId=%s&level=100", edgexBase, contractID)
url := fmt.Sprintf("%s/api/v1/public/quote/getDepth?contractId=%s&level=200", edgexBase, contractID)
if err := edgexGet(client, url, &book); err != nil {
s.Err = fmt.Sprintf("orderbook: %v", err)
s.FetchLatencyMs = time.Since(start).Milliseconds()
Expand Down
9 changes: 1 addition & 8 deletions harnesses/perp-fees/cmd/script/gmx.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ type gmxMarketInfo struct {
ID string `json:"id"`
PositionFeeFactorForPositiveImpact string `json:"positionFeeFactorForPositiveImpact"`
PositionFeeFactorForNegativeImpact string `json:"positionFeeFactorForNegativeImpact"`
// Some Subsquid deployments expose an unsuffixed field name.
// We fall back to it when the impact-branch fields are absent
// so a schema rename does not silently zero the fee.
PositionFeeFactor string `json:"positionFeeFactor"`
} `json:"marketInfos"`
} `json:"data"`
Errors []struct {
Expand Down Expand Up @@ -80,7 +76,7 @@ func fetchGMX(v VenueConfig) PerpSample {
// 1) Position fee from Subsquid (live on-chain factor)
q := gmxGqlReq{
Query: `query { marketInfos(where: {id_eq: "` + market + `"}) {
id positionFeeFactorForPositiveImpact positionFeeFactorForNegativeImpact positionFeeFactor
id positionFeeFactorForPositiveImpact positionFeeFactorForNegativeImpact
}}`,
}
bodyBytes, _ := json.Marshal(q)
Expand Down Expand Up @@ -126,9 +122,6 @@ func fetchGMX(v VenueConfig) PerpSample {
// If the schema is on an older/unsuffixed version we fall back to
// positionFeeFactor so a rename does not silently zero the reported fee.
rawFactor := m.PositionFeeFactorForNegativeImpact
if rawFactor == "" {
rawFactor = m.PositionFeeFactor
}
if rawFactor == "" {
s.Err = "subsquid_failed: missing positionFeeFactor fields"
s.FetchLatencyMs = time.Since(start).Milliseconds()
Expand Down
Loading