Skip to content

Commit

Permalink
test(boot): update fast-usdc test w.r.t. 0.5% variable fee
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Feb 28, 2025
1 parent be6d954 commit c6963dd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions packages/boot/test/fast-usdc/fast-usdc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ test.serial('makes usdc advance', async t => {
{ status: 'OBSERVED' },
{ status: 'ADVANCING' },
{ status: 'ADVANCED' },
{ status: 'DISBURSED', split: { ContractFee: { value: 302000n } } },
{ status: 'DISBURSED', split: { ContractFee: { value: 152_000n } } },
]);

const doc = {
Expand All @@ -519,12 +519,12 @@ test.serial('writes pool metrics to vstorage', async t => {
test.serial('distributes fees per BLD staker decision', async t => {
const { walletFactoryDriver: wd, buildProposal, evalProposal } = t.context;

const ContractFee = 302000n; // see split above
t.is(((ContractFee - 250000n) * 5n) / 10n, 26000n);
const ContractFee = 152_000n; // see split above
t.is(((ContractFee - 60_000n) * 5n) / 10n, 46_000n);

const cases = [
{ dest: 'agoric1a', args: ['--fixedFees', '0.25'], rxd: '250000' },
{ dest: 'agoric1b', args: ['--feePortion', '0.5'], rxd: '26000' },
{ dest: 'agoric1a', args: ['--fixedFees', '0.06'], rxd: '60000' },
{ dest: 'agoric1b', args: ['--feePortion', '0.5'], rxd: '46000' },
];
for (const { dest, args, rxd } of cases) {
await wd.provideSmartWallet(dest);
Expand Down
26 changes: 13 additions & 13 deletions packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ Generated by [AVA](https://avajs.dev).
variableRate: {
denominator: {
brand: Object @Alleged: USDC brand {},
value: 100n,
value: 1000n,
},
numerator: {
brand: Object @Alleged: USDC brand {},
value: 1n,
value: 5n,
},
},
},
Expand All @@ -214,15 +214,15 @@ Generated by [AVA](https://avajs.dev).
split: {
ContractFee: {
brand: Object @Alleged: USDC brand {},
value: 302000n,
value: 152000n,
},
PoolFee: {
brand: Object @Alleged: USDC brand {},
value: 1208000n,
value: 608000n,
},
Principal: {
brand: Object @Alleged: USDC brand {},
value: 148490000n,
value: 149240000n,
},
},
status: 'DISBURSED',
Expand Down Expand Up @@ -252,24 +252,24 @@ Generated by [AVA](https://avajs.dev).
},
numerator: {
brand: Object @Alleged: USDC brand {},
value: 151208001n,
value: 150608001n,
},
},
totalBorrows: {
brand: Object @Alleged: USDC brand {},
value: 148490000n,
value: 149240000n,
},
totalContractFees: {
brand: Object @Alleged: USDC brand {},
value: 302000n,
value: 152000n,
},
totalPoolFees: {
brand: Object @Alleged: USDC brand {},
value: 1208000n,
value: 608000n,
},
totalRepays: {
brand: Object @Alleged: USDC brand {},
value: 148490000n,
value: 149240000n,
},
},
],
Expand All @@ -289,15 +289,15 @@ Generated by [AVA](https://avajs.dev).
split: {
ContractFee: {
brand: Object @Alleged: USDC brand {},
value: 302000n,
value: 152000n,
},
PoolFee: {
brand: Object @Alleged: USDC brand {},
value: 1208000n,
value: 608000n,
},
Principal: {
brand: Object @Alleged: USDC brand {},
value: 148490000n,
value: 149240000n,
},
},
status: 'DISBURSED',
Expand Down
Binary file modified packages/boot/test/fast-usdc/snapshots/fast-usdc.test.ts.snap
Binary file not shown.

0 comments on commit c6963dd

Please sign in to comment.