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

chore: fusdc optional maxVariable in FeeConfig #10859

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0xpatrickdev
Copy link
Member

closes: #10858

Description

If maxVariable is undefined in FeeConfig, do not cap fees.

Security Considerations

None

Scaling Considerations

None

Documentation Considerations

None

Testing Considerations

Adds new unit test.

Upgrade Considerations

None, part of initial release for FUSDC.

@0xpatrickdev 0xpatrickdev requested a review from a team as a code owner January 16, 2025 23:24
Copy link

cloudflare-workers-and-pages bot commented Jan 16, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: fb901e0
Status: ✅  Deploy successful!
Preview URL: https://4f111d2f.agoric-sdk.pages.dev
Branch Preview URL: https://10858-max-variable-fee-confi.agoric-sdk.pages.dev

View logs

@0xpatrickdev 0xpatrickdev requested a review from turadg January 16, 2025 23:26
maxVariable: Amount<'nat'>;
/** a cap on variable fees. no cap if undefined */
maxVariable?: Amount<'nat'>;
/** percent of fees that go to contract (remaining goes to LPs) */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proportion of fees ("percent" is a particular notation)

flat: Amount<'nat'>;
/** percentage charged for every advance */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for these explanations. please be a bit more explicit.

Suggested change
/** percentage charged for every advance */
/** proportion of advance kept as a fee */

variableRate: Ratio;
maxVariable: Amount<'nat'>;
/** a cap on variable fees. no cap if undefined */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read this at first as a limit on how the variableRate could move. Now I understand it as a max on the variable component of the total fee.

Why have a max on that component instead of the fee overall? They're functionally equivalent offset by flat, but having a maxFee is much clearer to the user.

@0xpatrickdev 0xpatrickdev force-pushed the 10858/max-variable-fee-config branch from 10aa465 to fb901e0 Compare January 17, 2025 19:43
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change. Remember to update the PR title before merging

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

Successfully merging this pull request may close these issues.

FUSDC: maxVariable fee must be optional
2 participants