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: 0.1% variable rate #11073

Merged
merged 1 commit into from
Mar 3, 2025
Merged

chore: 0.1% variable rate #11073

merged 1 commit into from
Mar 3, 2025

Conversation

0xpatrickdev
Copy link
Member

@0xpatrickdev 0xpatrickdev commented Mar 3, 2025

Description

Changes fee from 0.5% to 0.1% per product request

Security / Scaling / Documentation Considerations

lowering the rate changes the incentives a bit: it encourages users while rewarding liquidity providers less on each tx

The fees and such should be discussed in the community governance thread.

Testing Considerations

Updates existing tests

Upgrade Considerations

None if part of the second FUSDC CE

@0xpatrickdev 0xpatrickdev requested a review from a team as a code owner March 3, 2025 22:01
Copy link

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1436433
Status: ✅  Deploy successful!
Preview URL: https://5ba51dca.agoric-sdk.pages.dev
Branch Preview URL: https://pc-fusdc-fee-config.agoric-sdk.pages.dev

View logs

@dckc dckc requested review from sufyaankhan and dtribble March 3, 2025 22:03
Comment on lines -522 to +527
const ContractFee = 152_000n; // see split above
t.is(((ContractFee - 60_000n) * 5n) / 10n, 46_000n);
const ContractFee = 32000n; // see split above
t.is(((ContractFee - 16_000n) * 5n) / 10n, 8_000n);

const cases = [
{ dest: 'agoric1a', args: ['--fixedFees', '0.06'], rxd: '60000' },
{ dest: 'agoric1b', args: ['--feePortion', '0.5'], rxd: '46000' },
{ dest: 'agoric1a', args: ['--fixedFees', '0.016'], rxd: '16000' },
{ dest: 'agoric1b', args: ['--feePortion', '0.5'], rxd: '8000' },
Copy link
Member

@dckc dckc Mar 3, 2025

Choose a reason for hiding this comment

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

you asked about this one... yes, it looks right.

When the ContractFee from above goes down, there isn't as much in fees available to distribute, so these numbers have to be tweaked.

The --fixedFees choice is some arbitrary number below the ContractFee. Then the 2nd rxd is determined by half of what's left over.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool thanks for explaining here

@@ -28,7 +28,7 @@ const makeRatio = (numerator, numeratorBrand, denominator = 100n) =>
*/

/**
* Update feeConfig.variableRate to 0.5%, i.e. 5n/1000n
* Update feeConfig.variableRate to 0.1%, i.e. 1n/1000n
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we want to phrase this exactly as the request was made to us:

Suggested change
* Update feeConfig.variableRate to 0.1%, i.e. 1n/1000n
* Update feeConfig.variableRate to 10 basis points, i.e. 10n/10_000n

or with a BASIS_POINTS constant, just:

Suggested change
* Update feeConfig.variableRate to 0.1%, i.e. 1n/1000n
* Update feeConfig.variableRate to 10 basis points

probably not worth another ci spin

@@ -38,7 +38,7 @@ const makeRatio = (numerator, numeratorBrand, denominator = 100n) =>
const updateFeeConfig = (
feeConfigPre,
usdcBrand,
variableRate = makeRatio(5n, usdcBrand, 1000n),
variableRate = makeRatio(1n, usdcBrand, 1000n),
Copy link
Member

@dckc dckc Mar 3, 2025

Choose a reason for hiding this comment

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

this could be:

Suggested change
variableRate = makeRatio(1n, usdcBrand, 1000n),
variableRate = makeRatio(10n, usdcBrand, BASIS_POINTS),

with

const BASIS_POINTS = 100n * 100n;

or:

const PERCENT = 100n;
const BASIS_POINTS = PERCENT * 100n;

above somewhere.

@0xpatrickdev 0xpatrickdev added the automerge:rebase Automatically rebase updates, then merge label Mar 3, 2025
@mergify mergify bot merged commit 221a4b4 into master Mar 3, 2025
95 checks passed
@mergify mergify bot deleted the pc/fusdc-fee-config branch March 3, 2025 23:12
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.

2 participants