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

Direct transfers should not pay mediation fees #4815

Closed
rakanalh opened this issue Sep 10, 2019 · 5 comments · Fixed by #4816
Closed

Direct transfers should not pay mediation fees #4815

rakanalh opened this issue Sep 10, 2019 · 5 comments · Fixed by #4816
Assignees
Milestone

Comments

@rakanalh
Copy link
Contributor

Intro

In #4760, a 2% mediation fee gets added to a certain transfer per hop. This is currently causing problems in the scenario where the target is a direct neighbour of the initiator.

Using internal routing, when no mediation takes place and a transfer is direct between X & Y, there should be no mediation fees added to the transfer.

@rakanalh rakanalh added this to the Alderaan milestone Sep 10, 2019
@rakanalh rakanalh self-assigned this Sep 10, 2019
@rakanalh rakanalh added this to Backlog in Raiden Client via automation Sep 10, 2019
@rakanalh rakanalh moved this from Backlog to In progress in Raiden Client Sep 10, 2019
@LefterisJP
Copy link
Contributor

LefterisJP commented Sep 10, 2019

In #4760, a 2% mediation fee gets added to a certain transfer per hop

No the mediation fee percentage is for the entire route since internal routing does not have a good educated guess for the number of hops.

Using internal routing, when no mediation takes place and a transfer is direct between X & Y, there should be no mediation fees added to the transfer.

Yep! Also the PR for this should add a test that there are no fees involved in direct transfers.

@palango
Copy link
Contributor

palango commented Sep 10, 2019

No the mediation fee percentage is for the entire route since internal routing does not have a good educated guess for the number of hops.

I think this is wrong. The code does know how many hops are in the path.

@LefterisJP
Copy link
Contributor

I think this is wrong. The code does know how many hops are in the path.

Yes it does. My bad, wanted to say that it does not have the latest view of the hops as the PFS does.

@rakanalh
Copy link
Contributor Author

@LefterisJP question:

raiden/raiden/routing.py

Lines 213 to 215 in f8084c4

# https://github.com/raiden-network/raiden/issues/4751
# Internal routing doesn't know about fee so it should set a percentage per hop
estimated_fee = FeeAmount(round(INTERNAL_ROUTING_DEFAULT_FEE_PERC * amount))

I can see that the estimated_fees are for the whole route... does this make the comment above the calculation invalid?

@LefterisJP
Copy link
Contributor

I can see that the estimated_fees are for the whole route... does this make the comment above the calculation invalid?

Yes the comment is wrong in this case. Please change it.

@rakanalh rakanalh moved this from In progress to in review in Raiden Client Sep 11, 2019
Raiden Client automation moved this from in review to Done Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Raiden Client
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants