Skip to content

Implement Mayachain Affiliate Fee Indexer API Endpoint #11558

@premiumjibles

Description

@premiumjibles

Description:

Implement a Mayachain coinstack in shapeshift-unchained to provide the affiliate fees API endpoint at https://api.mayachain.shapeshift.com/api/v1/affiliate/fees.

Background:

The revenue-dashboard has been calling a non-existent Mayachain API endpoint since inception. The endpoint was assumed to exist but was never implemented. This has caused all Mayachain affiliate

fees to be silently dropped.

CRITICAL CLARIFICATION:

  • This endpoint is NOT external - it's something WE implement in shapeshift-unchained
  • Thorchain HAS this: go/coinstacks/thorchain/api/affiliateFees.go (blockchain indexer)
  • Mayachain DOES NOT: No go/coinstacks/mayachain/ directory exists
  • The "down" status means it was never deployed, not that it's temporarily unavailable
  • This is a separate work item from the revenue-dashboard fixes below

Scope:

  1. Create go/coinstacks/mayachain/ in shapeshift-unchained repo
  2. Copy/adapt from go/coinstacks/thorchain/api/affiliateFees.go
  3. Change affiliate identifier from "ss" to "ssmaya" (line 176 in Thorchain)
  4. Update affiliate wallet addresses for Mayachain
  5. Configure chain-specific RPC endpoints
  6. Update native token references (CACAO vs RUNE)
  7. Deploy as api.mayachain.shapeshift.com

Acceptance Criteria:

  • API endpoint returns affiliate fees in same format as Thorchain
  • Memo parsing correctly identifies "ssmaya" swaps
  • API filters for Mayachain-specific affiliate addresses
  • Integration tests pass
  • Endpoint is deployed and accessible

Technical Notes:

  • Implementation should be 95% identical to Thorchain
  • Reference: /home/sean/Repos/shapeshift-unchained/go/coinstacks/thorchain/api/affiliateFees.go
  • The revenue-dashboard code is already written and ready to consume this API

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions