Skip to content

Consolidate Trade fee fields: MakerFee + TakerFee → Fee (closes #70)#71

Open
CLAM101 wants to merge 1 commit intomainfrom
70-verify-align-trade-fee-fields
Open

Consolidate Trade fee fields: MakerFee + TakerFee → Fee (closes #70)#71
CLAM101 wants to merge 1 commit intomainfrom
70-verify-align-trade-fee-fields

Conversation

@CLAM101
Copy link
Copy Markdown
Contributor

@CLAM101 CLAM101 commented Apr 24, 2026

Summary

  • Replaces MakerFee int64 + TakerFee int64 on Trade with a single Fee int64 — maker fee is always 0, only takers are charged
  • Updates migration 000002_create_trades.up.sql, pg_repository.go INSERT (10 params → 9), docs/schema.sql, and both test files

Test Plan

  • go build ./... — passes
  • make lint — passes
  • make test-integration with stack running to verify SaveTrade and affiliate repo tests against the updated schema

Maker fee is always 0; only takers are charged. The split-field naming
implied a per-role rate model that doesn't exist — each order signs a
single feeRateBps. Replace both fields with Fee int64 across domain,
migration, repository, schema doc, and tests.
@CLAM101 CLAM101 added the bug Something isn't working label Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant