-
Notifications
You must be signed in to change notification settings - Fork 229
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
chore: 0.1% variable rate #11073
Conversation
Deploying agoric-sdk with
|
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 |
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' }, |
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.
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.
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.
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 |
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 wonder if we want to phrase this exactly as the request was made to us:
* 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:
* 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), |
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.
this could be:
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.
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