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 remove maxVariable from FeeConfig #10859

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

0xpatrickdev
Copy link
Member

@0xpatrickdev 0xpatrickdev commented Jan 16, 2025

closes: #10858

Description

remove maxVariable (cap on variable fee) from FeeConfig

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: 003861a
Status: ✅  Deploy successful!
Preview URL: https://fa793e9f.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

@0xpatrickdev 0xpatrickdev changed the title chore: fusdc optional maxVariable in FeeConfig chore: fusdc remove maxVariable from FeeConfig Jan 17, 2025
@0xpatrickdev 0xpatrickdev added the automerge:rebase Automatically rebase updates, then merge label Jan 17, 2025
@0xpatrickdev 0xpatrickdev force-pushed the 10858/max-variable-fee-config branch from fb901e0 to 003861a Compare January 17, 2025 23:55
@mergify mergify bot merged commit 2288a0c into master Jan 18, 2025
83 checks passed
@mergify mergify bot deleted the 10858/max-variable-fee-config branch January 18, 2025 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FUSDC: maxVariable fee must be optional
2 participants