Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade network fees to support multiple assets #5170

Closed
woodenfurniture opened this issue Aug 24, 2023 · 1 comment
Closed

Upgrade network fees to support multiple assets #5170

woodenfurniture opened this issue Aug 24, 2023 · 1 comment
Assignees
Milestone

Comments

@woodenfurniture
Copy link
Member

woodenfurniture commented Aug 24, 2023

Currently our swappers and ui can only convey the concept of an "inbound network fee", however it's possible to have an "outbound network fee"
https://dev.thorchain.org/thorchain-dev/concepts/fees

We need to upgrade the interfaces, logic and UI to support this in order to accurately represent trades on thorchain (and lifi).

Upgrade the interfaces in lib/swapper/api.ts:

export type Fee = { requiresBalance: boolean } & AmountDisplayMeta

export type QuoteFeeData<T extends ChainId> = {
  networkFees: PartialRecord<AssetId, Fee> // fee(s) paid to the network from the fee asset (undefined if unknown)
  protocolFees: PartialRecord<AssetId, Fee> // fee(s) paid to the protocol(s)
} & ChainSpecificQuoteFeeData<T>

And then upgrade the UI to display multiple network fees, simiilar to how we do for protocol fees.

Dont forget to include this additional network fee in calculations that take fees into account!

Dont forget to upgrade thorchain swapper with the outbound fee as per the link above!

@woodenfurniture woodenfurniture self-assigned this Aug 24, 2023
@woodenfurniture woodenfurniture changed the title Upgrade network fess to support multiple assets Upgrade network fees to support multiple assets Aug 25, 2023
@woodenfurniture woodenfurniture added this to the SwapShillin milestone Aug 25, 2023
@woodenfurniture
Copy link
Member Author

We should do this after #5171 is complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants