-
Notifications
You must be signed in to change notification settings - Fork 217
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
feat(fast-usdc): withdraw and distribute contract fees #10815
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
9e95057
to
5446fa4
Compare
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.
Approving contingent on requests.
That multichain test turned out nicely
@@ -132,6 +140,7 @@ export const prepareLiquidityPoolKit = (zone, zcf, USDC, tools) => { | |||
const poolStats = harden({ | |||
totalBorrows: makeEmpty(USDC), | |||
totalContractFees: makeEmpty(USDC), | |||
// TODO? availableContractFees: makeEmpty(USDC) |
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.
unnecessary, please remove
const proposal = seat.getProposal(); | ||
const { want } = proposal; |
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.
proposal
isn't necessary and makes more for the reader to track.
const proposal = seat.getProposal(); | |
const { want } = proposal; | |
const { want } = seat.getProposal(); |
then below,
zcf.atomicRearrange(harden([[feeSeat, seat, want]]));
isGTE(available, want.USDC) || | ||
Fail`cannot withdraw ${want.USDC}; only ${available} available`; |
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.
out of scope but this strikes me as a useful helper fn
// COMMIT POINT | ||
zcf.atomicRearrange(harden([[feeSeat, seat, proposal.want]])); | ||
seat.exit(); | ||
// TODO? external.publishPoolMetrics(); |
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.
nope
}) || | ||
assert.fail(usage)), | ||
}; | ||
await writeCoreEval('eval-fast-usdc-distribute-fees', utils => |
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.
consider matching the module name, fast-usdc-fees
. If you prefer to include "distribute", it could also go in this module name. The "eval-" is common to every writeCoreEval so if you think that's worthwhile, we could put that into the helper but that's out of scope
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 ci failure just reminded me why it should start with eval-
:
Untracked files:
(use "git add <file>..." to include in what will be committed)
multichain-testing/fast-usdc-fees-permit.json
multichain-testing/fast-usdc-fees-plan.json
multichain-testing/fast-usdc-fees.js
We have a .gitignore
for it:
agoric-sdk/multichain-testing/.gitignore
Lines 7 to 8 in 7e9048c
# builder prefix for core evals | |
eval-* |
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.
Oof, that's quite a surprise. No opinion on the name in this PR but I think we should not have module kinds designated by filename prefixes. We could have a suffix: #10490 (comment) or put the output in directory conventional for build output, like dist
.
const kwUSDC = 'USDC'; // keyword in AmountKeywordRecord | ||
const issUSDC = 'USDC'; // issuer name | ||
|
||
const trace = (...args) => console.log('FUCF', ...args); |
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.
does importing makeTracer
create problems? this is fine, just curious
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.
no, I didn't run into problems.
This is left over from an earlier phase where I was avoiding all the builder stuff, since the core-eval is so simple. Then I realized the a3p core eval stuff expects it, so I stopped avoiding it.
I'm confused... this test runs fine locally... p.s. not with
|
ouch:
https://github.com/Agoric/agoric-sdk/actions/runs/12758495527/job/35560759090?pr=10815#step:5:7218 |
61afe3a
to
45dfb0a
Compare
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
This pull request has been removed from the queue for the following reason: The pull request can't be updated You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
1 similar comment
This pull request has been removed from the queue for the following reason: The pull request can't be updated You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
- test: 1 positive, 1 negative - liquidity pool: feeRecipient facet, withdrawFeeHandler facet - diagnostics for insufficient fees available - contract: creatorFacet method - typed proposal shape
- prune unused type imports - FastLP token name is decided; prune UNTIL
move metrics test after advance
closes: #10700
refs: #10847
Description
Security / Scaling Considerations / Upgrade Considerations
straightforward; not yet deployed
Documentation Considerations
Use: [--fixedFees <number> | --feePortion <percent>] --destinationAddress <address>
document how to use it with cosgovTesting Considerations