Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Register now

ADD: Affiliate Fees

Affiliate Fees

Affiliate Fees allow for merchants, wallets, exchanges and more to collect fee revenue for facilitating swaps through their interfaces. This should provide a means of funding for great and varied user interfaces.

Affiliate Fees are

  • Optional (up to the service to implement them)
  • Inspectable (users should be able to inspect them prior to sending, as a a means to both opt in and be transparent
  • Allow micro-revenue to be collected (10c and below in value).

Implementation

MEMO

A swap memo normally is SWAP:ASSET:DESTINATION:TRADELIMIT

With an affiliate fee, two extra fields are added:

SWAP:ASSET:DESTINATION:TRADELIMIT:AFFILIATE-ADDRESS:FEE-AMOUNT

Eg: SWAP:THOR.RUNE::: thor1uwxgm4w8ud6pu4dc2s5tqnrmk7exjzjpvm2krs:100 (66 Bytes)

SWAP:THOR.RUNE:thor1uwxgm4w8ud6pu4dc2s5tqnrmk7exjzjpvm2krs:123123123:thor1uwxgm4w8ud6pu4dc2s5tqnrmk7exjzjpvm2krs:100 (117 bytes)

For Bitcoin, the memo is capped at 80 bytes, so both shortened assets & THORNames need to be used:

s:ETH.USDT::shapeshift:100

Fee Amount

The fee amount is in basis points, ie 10 = 10 BPs, 0.1%. The wallet sets their own logic for fees, and anything up to 1000 BP (10%) is allowed. This would allow the wallet to set dynamic pricing for their users by inserting the fee after the user has specified their trade size. Conceivably, dynamic fees could allow both fixed-rate, fixed-size, min/max or a hybrid of anything.

Fee Revenue

All fee revenue is captured in RUNE and paid direct to the affiliate.

  • Swap From Rune (RUNE taken prior to swap)
  • Swap To Rune (RUNE taken after swap)
  • Swap between assets (RUNE taken during swap)
Edited Jun 23, 2021 by THORChain
Assignee Loading
Time tracking Loading