-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add partner fee meta-data #53
Conversation
b128922
to
0243cdb
Compare
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
4. Modify the `compile.ts` script | ||
|
||
- Add the exported constant with the latest version in, and the new metadata: | ||
- For example: https://github.com/cowprotocol/app-data/pull/44/commits/aeef8a58e7bbd2a53664ce396011cb157a18406d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated: this link was just broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comments, the build is currently broken
src/schemas/definitions.json
Outdated
"type": "string" | ||
}, | ||
"bips": { | ||
"$id": "#/definitions/bips", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use this definition in the quote slippageBips
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the other way around here: #55
The build was broken before. Fixed in #54 |
e5fbb8f
to
5c027da
Compare
test/schema.spec.ts
Outdated
@@ -627,6 +628,142 @@ describe('Schema v0.11.0', () => { | |||
) | |||
}) | |||
|
|||
describe('Schema v0.12.0', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in #55, v0.12 won't be created. It'll be v1.0 instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, but the changes are independent and I did the version here. I thought is ok to version it still, as those are 2 different changes and the one in this PR is backward compatible
I will delete the 0.12.0 in #54 instead as it seems you prefer 0.12.0 don't exist. If fine with that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we call it bps. Bips is very colloquial and not the official abbreviation: https://www.investopedia.com/ask/answers/what-basis-point-bps |
@fleupold no problem with that on my end. The only issue will be that for coherence would be great if I change it also in the quote information. I could make it part of the breaking change #55 This would require @olgafetisova to adapt the queries, and I'm unsure if that's problematic or not. Maybe she could confirm if it's ok to rename. |
Keep in mind this change would require analytics to handle both cases for |
yes, that was my point. This is why I bring it up:
|
We are currently changing slippageBips to integer in the code right away before doing any other adjustments, so I think casting both string and integer to integer should not break anything. |
Due to historical reasons and consistency, I prefer |
If you change slippageBips to bips then it will break some queries, not a big work to adjust it but might take 1-3 days from Dune side to approve the PR, so we might be experiencing some issues there. So I would prefer the name to stay as it is for slippage. If you change slippageBips from string to integer, it won't break the code. Everything will remain as is. |
I would personally not add you 1-3 days of work for this name change (discard option 3) @fleupold do you agree? If we can't change it for the quote, I would slightly prefer option 2, yes it's not coherent but at least we don't keep using the wrong term for some metadata that is more relevant for integrators. Otherwise, we can go with option 1. |
I went over the documentation again and I do not see any simple way to allow a non-existing column in the code (as it will happen when we add the change). The change has to happen on the ETL side which is written in a flat way (same as in our backend), hence, there is no consideration for columns. |
Use bips for slippage
Okay, I believe we arrive to consensus over option 2. I applied the changes. Will create a release of this library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Add a new type of metadata:
partnerFee
This meta-data will allow anyone to encode the intent to charge a fee for a given order.
Version schema:Version schema:v0.12.0
v1.0.0
(changes are now breaking changes)compile.ts
to export the new metadata schemaValidations
bip
,recipient
bip
is an integer (not a string)bip
should be greater than zero, and less than 10,000 (the protocol might limit further the maximum, for example 300, or 3%)See unit tests
Example
Example on the new metadata: