Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6a9a25a
WIP withdraw/rebalance and solver approach
dtribble Sep 9, 2025
ac19f08
Move to a file-based definition of the network routes
dtribble Sep 10, 2025
064a590
First integration into deposit
dtribble Sep 10, 2025
370e803
Todo and doc updates
dtribble Sep 10, 2025
eb9d29c
minor test fixes and cleanups during walkthrough
dtribble Sep 10, 2025
5b8a504
fix: remove unused network definitions
dtribble Sep 12, 2025
41a22db
Use solver for deposit sequencing.
dtribble Sep 14, 2025
2cd76cb
Improve the graph format to enforce the schema with types
dtribble Sep 14, 2025
36f6a0a
update design doc
dtribble Sep 14, 2025
106ac7b
Use combo minimization, with speed/cost first and cost/speed second.
dtribble Sep 15, 2025
84bba87
Replicate deposit tests into rebalance tests
dtribble Sep 15, 2025
3822b06
Remove deprecated planTransfer and planTransferPath
dtribble Sep 15, 2025
d0a9421
Refactors allocation logic; keeps extra pools
dtribble Sep 15, 2025
e2a8250
Removes bigint scaling; skips @agoric→+agoric edge
dtribble Sep 15, 2025
0d97f2e
test(ymax-planner): Update snapshots for the solver-based approach
gibson042 Sep 17, 2025
f9ee24e
docs(portfolio-contract): Plan some renames
gibson042 Sep 18, 2025
ba2d21a
refactor(portfolio-contract): Improve variable names
gibson042 Sep 18, 2025
4df35c5
refactor(portfolio-contract): Make better use of addOrReplaceEdge
gibson042 Sep 18, 2025
296f970
refactor(portfolio-contract): Avoid redundant array copies
gibson042 Sep 18, 2025
ed21c6d
refactor(portfolio-contract): Make intra-Agoric links unidirectional
gibson042 Sep 18, 2025
2fa2bc3
test(portfolio-contract): Simplify rebalance.test.ts
gibson042 Sep 19, 2025
76a4971
refactor(portfolio-contract): Embrace javascript-lp-solver
gibson042 Sep 19, 2025
b343afb
feat(portfolio-contract): Include LP-solver failure results in error …
gibson042 Sep 19, 2025
f08a2f5
Add support for USDN and GMP fees
dtribble Sep 23, 2025
a0dddb2
Reactivate always-on tracing in protfolio components.
dtribble Sep 23, 2025
b2caee0
doc: comment the deposit test
dtribble Sep 23, 2025
f977d58
test(portfolio-contract): Cover both "cheapest" and "fastest" solver …
gibson042 Sep 23, 2025
b90e3d4
refactor(portfolio-contract): Clean up plan-solve.ts
gibson042 Sep 23, 2025
763eb26
feat(portfolio-contract): Allow multiple edges between the same nodes
gibson042 Sep 23, 2025
2c7419f
test(portfolio-contract): Add test for planRebalanceFlow with mode "f…
gibson042 Sep 23, 2025
539438c
test(ymax-planner): Update snapshot
gibson042 Sep 24, 2025
b321fa3
chore: Change ymax fixed fee to 30 BLD
gibson042 Sep 24, 2025
4feda74
fix(ymax-planner): Expect policyVersion and rebalanceCount
gibson042 Sep 24, 2025
3732799
chore(portfolio-contract): Remove fudge factor in rebalanceMinCostFlo…
gibson042 Sep 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .prettierrc.json5
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
plugins: ['prettier-plugin-sh'],
},
},
{
// Keep network definitions readable on wide lines
files: [
'packages/portfolio-contract/src/network/network.prod.ts',
'packages/portfolio-contract/test/network/test-network.ts',
],
options: {
printWidth: 180,
},
},
],
singleQuote: true,
}
11 changes: 6 additions & 5 deletions multichain-testing/scripts/ymax-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ import {
type ProposalType,
type TargetAllocation,
} from '@aglocal/portfolio-contract/src/type-guards.ts';
import {
makePortfolioQuery,
makePortfolioSteps,
} from '@aglocal/portfolio-contract/tools/portfolio-actors.ts';
import { makePortfolioSteps } from '@aglocal/portfolio-contract/src/plan-transfers.ts';
import { makePortfolioQuery } from '@aglocal/portfolio-contract/tools/portfolio-actors.ts';
import {
axelarConfigTestnet,
gmpAddresses as gmpConfigs,
Expand Down Expand Up @@ -157,7 +155,10 @@ const openPositions = async (
const goal = objectMap(goalData, toAmt);
console.debug('TODO: address Ethereum-only limitation');
const evm = 'Ethereum';
const { give: giveWFees } = makePortfolioSteps(goal, { evm, feeBrand: BLD });
const { give: giveWFees } = await makePortfolioSteps(goal, {
evm,
feeBrand: BLD,
});
// XXX WIP: contract is to pay BLD fee
const { GmpFee: _gf, ...give } = giveWFees;
const proposal: ProposalType['openPortfolio'] = {
Expand Down
1 change: 1 addition & 0 deletions packages/portfolio-contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@endo/marshal": "^1.8.0",
"@endo/pass-style": "^1.6.3",
"@endo/patterns": "^1.7.0",
"javascript-lp-solver": "^0.4.24",
"viem": "^2.31.0"
},
"ava": {
Expand Down
344 changes: 344 additions & 0 deletions packages/portfolio-contract/solver-approach-design.md

Large diffs are not rendered by default.

Loading
Loading