@continuumdao/ctm-mpc-defi 0.2.38 → 0.2.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/catalog.cjs +13 -6
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.js +13 -6
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/continuum-dao/SKILL.md +1 -1
- package/dist/agent/skills/gmx/SKILL.md +4 -4
- package/dist/protocols/evm/continuum-dao/index.cjs +13 -5
- package/dist/protocols/evm/continuum-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/continuum-dao/index.d.ts +3 -1
- package/dist/protocols/evm/continuum-dao/index.js +12 -6
- package/dist/protocols/evm/continuum-dao/index.js.map +1 -1
- package/dist/protocols/evm/gmx/index.cjs +17 -7
- package/dist/protocols/evm/gmx/index.cjs.map +1 -1
- package/dist/protocols/evm/gmx/index.d.ts +7 -1
- package/dist/protocols/evm/gmx/index.js +17 -7
- package/dist/protocols/evm/gmx/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -151,7 +151,7 @@ Builders refuse requests that the dialog would disable or that VotingEscrow / Mu
|
|
|
151
151
|
- **Transfer:** unattached; recipient not zero or self.
|
|
152
152
|
- **Vote:** proposal must be Active; KeyGen snapshot votes > 0; `hasVoted` false. Delta weights include NOTA.
|
|
153
153
|
|
|
154
|
-
Attach requires the claimed `nodeWithdrawAuthority` KeyGen that owns the NFT. `groupId` is implicit from that KeyGen (passed on-chain as the last `attachVeCtm` argument) and immediately binds the fee waiver — do not pick a different group. That KeyGen cannot attach a second NFT. A second group on the same node attaches after rotating `nodeWithdrawAuthority` to that group's secp256k1 KeyGen (anti-spoof: register/attach still require authority). Only governance detaches after `request detach`. Locked CTM must meet `veCtmThresholdPower` at attach. The monthly fee waiver and VPN then compare that NFT's `balanceOfNFTAt` at UTC month start to `veCtmThresholdPower` — do **not** tell the user to delegate votes to the KeyGen to meet that bar. Request detach refuses if not attached or already requested.
|
|
154
|
+
Attach and `increase_unlock_time` are unpaid (no month activation, no `globalNonce` bump). Do not wrap them with `syncBilling` / deposit. If current voting power is below `veCtmThresholdPower`, extend unlock first, then attach (same batch is fine). Attach requires the claimed `nodeWithdrawAuthority` KeyGen that owns the NFT. `groupId` is implicit from that KeyGen (passed on-chain as the last `attachVeCtm` argument) and immediately binds the fee waiver — do not pick a different group. That KeyGen cannot attach a second NFT. A second group on the same node attaches after rotating `nodeWithdrawAuthority` to that group's secp256k1 KeyGen (anti-spoof: register/attach still require authority). Only governance detaches after `request detach`. Locked CTM must meet `veCtmThresholdPower` at attach. The monthly fee waiver and VPN then compare that NFT's `balanceOfNFTAt` at UTC month start to `veCtmThresholdPower` — do **not** tell the user to delegate votes to the KeyGen to meet that bar. Request detach refuses if not attached or already requested.
|
|
155
155
|
|
|
156
156
|
Attached locks block transfer / merge / split / withdraw / liquidate on-chain (`checkNotAttached`).
|
|
157
157
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GMX V2 (classic mode)
|
|
2
2
|
|
|
3
|
-
Perpetuals on Arbitrum (42161) and Avalanche (43114) via `@gmx-io/sdk` v2
|
|
3
|
+
Perpetuals on Arbitrum (42161) and Avalanche (43114) via `@gmx-io/sdk` **v2.2c** classic orders only.
|
|
4
4
|
|
|
5
5
|
## Constraints
|
|
6
6
|
|
|
@@ -80,12 +80,12 @@ Use `orderId` from `fetchOrders` with `ctm_gmx_build_cancel_multisign`.
|
|
|
80
80
|
|
|
81
81
|
## GM liquidity (phase 2)
|
|
82
82
|
|
|
83
|
-
GM pool deposit/withdraw uses **ExchangeRouter multicall** (not `prepareOrder`):
|
|
83
|
+
GM pool deposit/withdraw uses **v2.2c ExchangeRouter multicall** (not `prepareOrder`):
|
|
84
84
|
|
|
85
85
|
1. `ctm_gmx_fetch_gm_markets({ chainId })` — GM markets + long/short collateral symbols + estimated APY
|
|
86
86
|
2. `ctm_gmx_fetch_gm_apy({ chainId })` — same APY data sorted by yield (highest first)
|
|
87
|
-
3. `ctm_gmx_build_gm_deposit_multisign` — approve
|
|
88
|
-
4. `ctm_gmx_build_gm_withdraw_multisign` — approve GM token
|
|
87
|
+
3. `ctm_gmx_build_gm_deposit_multisign` — approve collateral to **SyntheticsRouter**, then `multicall(sendWnt + sendTokens + createDeposit)`
|
|
88
|
+
4. `ctm_gmx_build_gm_withdraw_multisign` — approve GM token to **SyntheticsRouter**, then `multicall(sendWnt + sendTokens + createWithdrawal)`
|
|
89
89
|
|
|
90
90
|
Keeper execution is asynchronous (same as perp orders). Execution fee is paid in native gas token via `sendWnt`.
|
|
91
91
|
|
|
@@ -950,6 +950,7 @@ var CONTINUUM_DAO_DELEGATE_FALLBACK = 160000n;
|
|
|
950
950
|
var CONTINUUM_DAO_TRANSFER_FALLBACK = 160000n;
|
|
951
951
|
var CONTINUUM_DAO_ATTACH_FALLBACK = 450000n;
|
|
952
952
|
var CONTINUUM_DAO_DETACH_FALLBACK = 220000n;
|
|
953
|
+
var INCREASE_UNLOCK_TIME_SIGNATURE = "increase_unlock_time(uint256,uint256)";
|
|
953
954
|
var erc20Abi2 = viem.parseAbi([
|
|
954
955
|
"function allowance(address owner, address spender) view returns (uint256)",
|
|
955
956
|
"function approve(address spender, uint256 amount) returns (bool)"
|
|
@@ -1005,14 +1006,17 @@ function parseTokenId(raw) {
|
|
|
1005
1006
|
if (id <= 0n) throw new Error("veCTM token id must be greater than zero.");
|
|
1006
1007
|
return id;
|
|
1007
1008
|
}
|
|
1009
|
+
function continuumDaoSignatureText(extra, chainId) {
|
|
1010
|
+
return JSON.stringify({
|
|
1011
|
+
kind: "ContinuumDAO",
|
|
1012
|
+
...extra,
|
|
1013
|
+
chainId
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1008
1016
|
function meta(evmType, chainId, to, extra, gasLimit) {
|
|
1009
1017
|
return {
|
|
1010
1018
|
destinationAddress: to,
|
|
1011
|
-
signatureText:
|
|
1012
|
-
kind: "ContinuumDAO",
|
|
1013
|
-
...extra,
|
|
1014
|
-
chainId
|
|
1015
|
-
}),
|
|
1019
|
+
signatureText: continuumDaoSignatureText(extra, chainId),
|
|
1016
1020
|
evm: { type: evmType, version: 1, chainId: String(chainId), protocolId: CONTINUUM_DAO_PROTOCOL_ID },
|
|
1017
1021
|
continuumDao: { ...extra, gas: { baseGasUnits: gasLimit.toString() } }
|
|
1018
1022
|
};
|
|
@@ -1191,6 +1195,7 @@ async function buildEvmMultisignBodyContinuumDaoIncreaseUnlockTime(args) {
|
|
|
1191
1195
|
fallbackGas: CONTINUUM_DAO_INCREASE_UNLOCK_FALLBACK,
|
|
1192
1196
|
buildBatchMeta: ({ gasLimit }) => meta("continuum_dao_increase_unlock_time", args.chainId, ve, {
|
|
1193
1197
|
name: "VotingEscrow.increase_unlock_time",
|
|
1198
|
+
signature: INCREASE_UNLOCK_TIME_SIGNATURE,
|
|
1194
1199
|
tokenId: tokenId.toString(),
|
|
1195
1200
|
lockDurationSeconds: duration.toString()
|
|
1196
1201
|
}, gasLimit)
|
|
@@ -1461,6 +1466,7 @@ async function buildEvmMultisignBodyContinuumDaoAttachVeCtm(args) {
|
|
|
1461
1466
|
fallbackGas: CONTINUUM_DAO_ATTACH_FALLBACK,
|
|
1462
1467
|
buildBatchMeta: ({ gasLimit }) => meta("continuum_dao_attach", args.chainId, wallet, {
|
|
1463
1468
|
name: "MultiSignAgentWallet.attachVeCtm",
|
|
1469
|
+
signature: ATTACH_VECTM_SIGNATURE,
|
|
1464
1470
|
nodeKey,
|
|
1465
1471
|
tokenId: tokenId.toString(),
|
|
1466
1472
|
groupId
|
|
@@ -2937,6 +2943,7 @@ exports.FORUM_IDEA_SECTION = FORUM_IDEA_SECTION;
|
|
|
2937
2943
|
exports.FORUM_LOGIN_DELIVERY_KIND = FORUM_LOGIN_DELIVERY_KIND;
|
|
2938
2944
|
exports.GOVERNOR_STATE = GOVERNOR_STATE;
|
|
2939
2945
|
exports.GOVERNOR_STATE_LABELS = GOVERNOR_STATE_LABELS;
|
|
2946
|
+
exports.INCREASE_UNLOCK_TIME_SIGNATURE = INCREASE_UNLOCK_TIME_SIGNATURE;
|
|
2940
2947
|
exports.MAXTIME_SECONDS = MAXTIME_SECONDS;
|
|
2941
2948
|
exports.PROPOSAL_TYPE_LABELS = PROPOSAL_TYPE_LABELS;
|
|
2942
2949
|
exports.PROPOSAL_TYPE_TO_FORUM_SECTION = PROPOSAL_TYPE_TO_FORUM_SECTION;
|
|
@@ -3035,6 +3042,7 @@ exports.continuumDaoMpaMailboxSend = continuumDaoMpaMailboxSend;
|
|
|
3035
3042
|
exports.continuumDaoMpaRetract = continuumDaoMpaRetract;
|
|
3036
3043
|
exports.continuumDaoProtocolModule = continuumDaoProtocolModule;
|
|
3037
3044
|
exports.continuumDaoRegisterProposal = continuumDaoRegisterProposal;
|
|
3045
|
+
exports.continuumDaoSignatureText = continuumDaoSignatureText;
|
|
3038
3046
|
exports.continuumDaoTechnocoreBind = continuumDaoTechnocoreBind;
|
|
3039
3047
|
exports.ctmTokenAddressOnEvmChain = ctmTokenAddressOnEvmChain;
|
|
3040
3048
|
exports.encodeContinuumDaoNodeInfo = encodeContinuumDaoNodeInfo;
|