NexusMutual / cover-router

Computes optimal capacity allocation per Nexus Mutual staking pool on cover purchase
MIT License
1 stars 1 forks source link

Add commission and slippage on premium and annual to the quote route #63

Closed MilGard91 closed 4 months ago

MilGard91 commented 5 months ago

Context

Issue: #60 #61

Changes proposed in this pull request

Test plan

Checklist

Review

When reviewing a PR, please indicate intention in comments using the following emojis:

shark0der commented 5 months ago

This doesn't feel like the proper place for the slippage and commission calculation but we agreed to merge it and revisit this later. One of the issues with the code right now is the presence of business logic inside the controller - controllers should be skinny as they're not reusable and testing is weirder. Same applies for annualPrice which is calculated in the controller as well. A proper place for the commission and slippage would be inside the sdk. The annual price on the other hand should probably be inside the quote engine itself.

MilGard91 commented 5 months ago

LGTM

shark0der commented 4 months ago

Won't merge as we decided to move this to the SDK.