@arcnow/mcp 0.1.2 → 0.2.0
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/README.md +66 -43
- package/dist/config.d.ts +13 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +27 -16
- package/dist/config.js.map +1 -1
- package/dist/format.d.ts +31 -2
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +88 -1
- package/dist/format.js.map +1 -1
- package/dist/sdk-port.d.ts +23 -6
- package/dist/sdk-port.d.ts.map +1 -1
- package/dist/sdk-port.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +35 -4
- package/dist/server.js.map +1 -1
- package/dist/tools/errors.d.ts.map +1 -1
- package/dist/tools/errors.js +8 -7
- package/dist/tools/errors.js.map +1 -1
- package/dist/tools/pool.d.ts +24 -18
- package/dist/tools/pool.d.ts.map +1 -1
- package/dist/tools/pool.js +63 -50
- package/dist/tools/pool.js.map +1 -1
- package/dist/tools/read.d.ts +6 -2
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/read.js +110 -96
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/venue.d.ts +3 -3
- package/dist/tools/venue.d.ts.map +1 -1
- package/dist/tools/venue.js +8 -7
- package/dist/tools/venue.js.map +1 -1
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +85 -63
- package/dist/tools/write.js.map +1 -1
- package/package.json +2 -2
package/dist/tools/pool.js
CHANGED
|
@@ -9,14 +9,24 @@
|
|
|
9
9
|
* fill, with **two** charges already inside them, and this module's job is to
|
|
10
10
|
* take them back out and name each one:
|
|
11
11
|
*
|
|
12
|
-
* - **arcnow.io's
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
12
|
+
* - **arcnow.io's fee hook's 0.80%**, charged in the pool's quote token by
|
|
13
|
+
* `ArcNowFeeHook` inside the swap — off the input on a buy, out of the payout
|
|
14
|
+
* on a sell — and split creator / platform / protocol on the hook's own split.
|
|
15
|
+
* The SDK reports the amount as `feeQuote`.
|
|
16
|
+
* - **The pool's own 0.20% LP fee**, which is Uniswap's and not arcnow.io's: the
|
|
17
|
+
* `fee` field of the pool key, in hundredths of a bip (2000 is 0.20%), charged
|
|
17
18
|
* by the pool on the amount it swaps and kept by its liquidity. The SDK does
|
|
18
|
-
* not report it as an amount;
|
|
19
|
-
*
|
|
19
|
+
* not report it as an amount; the amount follows from the rate.
|
|
20
|
+
*
|
|
21
|
+
* Together 1.00% of the trade — the same as the curve charged before graduation.
|
|
22
|
+
*
|
|
23
|
+
* # Every rate is read, never assumed
|
|
24
|
+
*
|
|
25
|
+
* Both rates, their total and the hook's split come from the SDK's
|
|
26
|
+
* `Pool.fees()`, which reads the hook's `feeBps()` and `feeConfigOf()` and the
|
|
27
|
+
* pool key's `fee`. Nothing here holds a fee constant: a hook of another
|
|
28
|
+
* version is refused by the SDK before it is read, and a pool whose key carries
|
|
29
|
+
* another LP fee is reported at the fee it carries.
|
|
20
30
|
*
|
|
21
31
|
* # The quote is the SDK's, whichever currency of the key it is
|
|
22
32
|
*
|
|
@@ -37,8 +47,8 @@
|
|
|
37
47
|
*
|
|
38
48
|
* @module
|
|
39
49
|
*/
|
|
40
|
-
import { Bps, minQuoteOutFromQuote, minTokensOutFromQuote, QuoteAmount, Tokens,
|
|
41
|
-
import { addr, effectivePrice, money, note, price, priceMove, qty, report, section } from "../format.js";
|
|
50
|
+
import { Bps, minQuoteOutFromQuote, minTokensOutFromQuote, QuoteAmount, Tokens, WAD, } from "@arcnow/sdk";
|
|
51
|
+
import { addr, bpsPercent, effectivePrice, hookFeeRate, lpFee, money, note, poolFeeSplitSection, poolFeesLine, price, priceMove, qty, report, section, } from "../format.js";
|
|
42
52
|
import { renderPoolError } from "./errors.js";
|
|
43
53
|
import { parseQuoteAmount } from "./quote.js";
|
|
44
54
|
import { refuseCurveOnly, routerName, venueMovedText } from "./venue.js";
|
|
@@ -54,49 +64,47 @@ const TOLERANCES = [50n, 100n, 300n, 1000n];
|
|
|
54
64
|
* Large enough that the hook and the pool, which charge their fees on RAW
|
|
55
65
|
* units, round by at most one part in ten thousand: for 18-decimal native USDC
|
|
56
66
|
* that is 0.000001 USDC, and for 6-decimal EURC it is 0.01 EURC — a millionth
|
|
57
|
-
* of a EURC is one raw unit, on which a
|
|
67
|
+
* of a EURC is one raw unit, on which a 0.80% fee floors to nothing.
|
|
58
68
|
*/
|
|
59
69
|
export function spotProbe(quote) {
|
|
60
70
|
return QuoteAmount.fromRaw(quote, 10n ** BigInt(Math.max(4, quote.decimals - 6)));
|
|
61
71
|
}
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
-
return
|
|
65
|
-
}
|
|
66
|
-
/** What reaches the pool on a buy: the input after arcnow.io's 1%. */
|
|
67
|
-
function afterHookFee(quoteIn) {
|
|
68
|
-
return (quoteIn.wad * (BPS - TRADE_FEE_BPS)) / BPS;
|
|
72
|
+
/** What reaches the pool on a buy: the input after the hook's cut, at the rate the hook reports. */
|
|
73
|
+
function afterHookFee(quoteIn, fees) {
|
|
74
|
+
return (quoteIn.wad * (BPS - fees.hookFeeBps.bps)) / BPS;
|
|
69
75
|
}
|
|
70
76
|
/** The LP fee on a buy, in the quote: charged on what reaches the pool. */
|
|
71
|
-
export function buyLpFee(quoteIn,
|
|
72
|
-
const lp = (afterHookFee(quoteIn) * BigInt(
|
|
77
|
+
export function buyLpFee(quoteIn, fees) {
|
|
78
|
+
const lp = (afterHookFee(quoteIn, fees) * BigInt(fees.lpFeePips)) / LP_FEE_DENOMINATOR;
|
|
73
79
|
return QuoteAmount.fromWad(quoteIn.token, lp);
|
|
74
80
|
}
|
|
75
81
|
/** The LP fee on a sell, in tokens: charged on the tokens the pool takes in. */
|
|
76
|
-
export function sellLpFee(tokensIn,
|
|
77
|
-
return Tokens.fromWad((tokensIn.wad * BigInt(
|
|
82
|
+
export function sellLpFee(tokensIn, fees) {
|
|
83
|
+
return Tokens.fromWad((tokensIn.wad * BigInt(fees.lpFeePips)) / LP_FEE_DENOMINATOR);
|
|
78
84
|
}
|
|
79
85
|
/** The quote per token a buy filled at, with both fees taken back out. */
|
|
80
|
-
export function buyFillExFees(quoteIn, tokensOut,
|
|
86
|
+
export function buyFillExFees(quoteIn, tokensOut, fees) {
|
|
81
87
|
if (tokensOut.wad === 0n)
|
|
82
88
|
return undefined;
|
|
83
|
-
const swapped = (afterHookFee(quoteIn) * (LP_FEE_DENOMINATOR - BigInt(
|
|
89
|
+
const swapped = (afterHookFee(quoteIn, fees) * (LP_FEE_DENOMINATOR - BigInt(fees.lpFeePips)))
|
|
90
|
+
/ LP_FEE_DENOMINATOR;
|
|
84
91
|
return QuoteAmount.fromWad(quoteIn.token, (swapped * WAD) / tokensOut.wad);
|
|
85
92
|
}
|
|
86
93
|
/** The quote per token a sell filled at, with both fees taken back out. */
|
|
87
|
-
export function sellFillExFees(tokensIn, quoteOut,
|
|
88
|
-
const swapped = (tokensIn.wad * (LP_FEE_DENOMINATOR - BigInt(
|
|
94
|
+
export function sellFillExFees(tokensIn, quoteOut, fees) {
|
|
95
|
+
const swapped = (tokensIn.wad * (LP_FEE_DENOMINATOR - BigInt(fees.lpFeePips)))
|
|
96
|
+
/ LP_FEE_DENOMINATOR;
|
|
89
97
|
if (swapped === 0n)
|
|
90
98
|
return undefined;
|
|
91
|
-
const gross = (quoteOut.wad * BPS) / (BPS -
|
|
99
|
+
const gross = (quoteOut.wad * BPS) / (BPS - fees.hookFeeBps.bps);
|
|
92
100
|
return QuoteAmount.fromWad(quoteOut.token, (gross * WAD) / swapped);
|
|
93
101
|
}
|
|
94
102
|
/** The pool's spot price, fees out, from the SDK's quote of {@link spotProbe}. */
|
|
95
|
-
export async function poolSpotPrice(pool, quote,
|
|
103
|
+
export async function poolSpotPrice(pool, quote, fees) {
|
|
96
104
|
const probe = spotProbe(quote);
|
|
97
105
|
try {
|
|
98
106
|
const quoted = await pool.quoteBuy(probe);
|
|
99
|
-
return buyFillExFees(probe, quoted.tokensOut,
|
|
107
|
+
return buyFillExFees(probe, quoted.tokensOut, fees);
|
|
100
108
|
}
|
|
101
109
|
catch {
|
|
102
110
|
return undefined;
|
|
@@ -126,14 +134,15 @@ function againstSpot(spot, fill, side) {
|
|
|
126
134
|
+ `own size alone (a ${side} fills ${side === "buy" ? "above" : "below"} spot)`],
|
|
127
135
|
]);
|
|
128
136
|
}
|
|
129
|
-
function spotNote(quote) {
|
|
137
|
+
function spotNote(quote, fees) {
|
|
130
138
|
return `How the spot price is read: @arcnow/sdk has no reader for a pool's price, so it is the `
|
|
131
139
|
+ `SDK's own quote of a ${spotProbe(quote).format()} probe buy with both fees taken back `
|
|
132
|
-
+ "out — an order too small to move the price. A pool swap names no referrer
|
|
133
|
-
+
|
|
140
|
+
+ "out — an order too small to move the price. A pool swap names no referrer: the fee hook "
|
|
141
|
+
+ `splits its ${bpsPercent(fees.hookFeeBps)} between the creator, the platform and the `
|
|
142
|
+
+ "protocol, and the pool's LP fee is nobody's revenue — the migrator burned its position.";
|
|
134
143
|
}
|
|
135
144
|
function curveOnlyNamed(args) {
|
|
136
|
-
return ["referrer"
|
|
145
|
+
return ["referrer"].filter((field) => args[field] !== undefined);
|
|
137
146
|
}
|
|
138
147
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
139
148
|
export async function quotePoolBuy(args, ctx, market, symbol) {
|
|
@@ -153,10 +162,12 @@ export async function quotePoolBuy(args, ctx, market, symbol) {
|
|
|
153
162
|
}
|
|
154
163
|
if (quote.venue !== "pool")
|
|
155
164
|
return { isError: true, text: venueMovedText("arcnow_quote_buy") };
|
|
156
|
-
|
|
157
|
-
|
|
165
|
+
// The rates come off the chain — the hook's feeBps() and the key's fee — and
|
|
166
|
+
// every figure below is derived from them, not from a constant here.
|
|
167
|
+
const fees = await pool.fees();
|
|
168
|
+
const spot = await poolSpotPrice(pool, quoteToken, fees);
|
|
158
169
|
const avg = effectivePrice(quote.quoteIn, quote.tokensOut);
|
|
159
|
-
const fill = buyFillExFees(quote.quoteIn, quote.tokensOut,
|
|
170
|
+
const fill = buyFillExFees(quote.quoteIn, quote.tokensOut, fees);
|
|
160
171
|
const router = routerName(ctx.port.config);
|
|
161
172
|
return {
|
|
162
173
|
text: report(`Buy quote — POOL — ${money(quoteIn)} into ${symbol}, in its Uniswap v4 pool`, note(`This is a Uniswap v4 pool quote, not a bonding-curve quote. ${symbol} graduated and `
|
|
@@ -164,19 +175,20 @@ export async function quotePoolBuy(args, ctx, market, symbol) {
|
|
|
164
175
|
+ `swap through arcnow.io's router at ${router} against the pool as it is now.`), section("what you pay and get", [
|
|
165
176
|
["venue", `Uniswap v4 pool, through arcnow.io's router ${router}`],
|
|
166
177
|
["you send", buyPaymentLine(quote.quoteIn, `arcnow.io's router ${router}`)],
|
|
167
|
-
["
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
178
|
+
["fees in all", poolFeesLine(fees, quoteToken)],
|
|
179
|
+
["arcnow.io fee", `${money(quote.feeQuote)} — ${hookFeeRate(fees)}, taken in `
|
|
180
|
+
+ `${quoteToken.symbol} by arcnow.io's fee hook off the input, inside the swap`],
|
|
181
|
+
["pool fee", `${lpFee(fees.lpFeePips)} — Uniswap's LP fee, charged by the pool on what `
|
|
182
|
+
+ `reaches it and kept by its liquidity: about ${money(buyLpFee(quote.quoteIn, fees))} `
|
|
171
183
|
+ "of this order"],
|
|
172
184
|
["tokens out", qty(quote.tokensOut, symbol)],
|
|
173
185
|
["average fill price", avg === undefined
|
|
174
186
|
? "n/a"
|
|
175
187
|
: `${price(avg)} — everything you pay, both fees in, over everything you get`],
|
|
176
|
-
]), againstSpot(spot, fill, "buy"), section("minimum tokens out, by tolerance", TOLERANCES.map((bps) => [
|
|
188
|
+
]), poolFeeSplitSection(fees), againstSpot(spot, fill, "buy"), section("minimum tokens out, by tolerance", TOLERANCES.map((bps) => [
|
|
177
189
|
`${bps} bps (${Number(bps) / 100}%)`,
|
|
178
190
|
qty(minTokensOutFromQuote(quote, Bps.of(bps)), symbol),
|
|
179
|
-
])), note(spotNote(quoteToken)), note("This quote is one block old the moment it is returned. Anybody's trade in this pool "
|
|
191
|
+
])), note(spotNote(quoteToken, fees)), note("This quote is one block old the moment it is returned. Anybody's trade in this pool "
|
|
180
192
|
+ "moves it, which is what the minimum-out floor is for.")),
|
|
181
193
|
};
|
|
182
194
|
}
|
|
@@ -210,10 +222,10 @@ export async function quotePoolSell(args, ctx, market, symbol) {
|
|
|
210
222
|
}
|
|
211
223
|
if (quote.venue !== "pool")
|
|
212
224
|
return { isError: true, text: venueMovedText("arcnow_quote_sell") };
|
|
213
|
-
const [
|
|
214
|
-
const spot = await poolSpotPrice(pool, quoteToken,
|
|
225
|
+
const [fees, approved] = await Promise.all([pool.fees(), pool.routerAllowance(holder)]);
|
|
226
|
+
const spot = await poolSpotPrice(pool, quoteToken, fees);
|
|
215
227
|
const avg = effectivePrice(quote.quoteOut, quote.tokensIn);
|
|
216
|
-
const fill = sellFillExFees(quote.tokensIn, quote.quoteOut,
|
|
228
|
+
const fill = sellFillExFees(quote.tokensIn, quote.quoteOut, fees);
|
|
217
229
|
const router = routerName(ctx.port.config);
|
|
218
230
|
return {
|
|
219
231
|
text: report(`Sell quote — POOL — ${qty(tokensIn, symbol)}, in its Uniswap v4 pool`, note(`This is a Uniswap v4 pool quote, not a bonding-curve quote. ${symbol} graduated and `
|
|
@@ -222,15 +234,16 @@ export async function quotePoolSell(args, ctx, market, symbol) {
|
|
|
222
234
|
["venue", `Uniswap v4 pool, through arcnow.io's router ${router}`],
|
|
223
235
|
["you send", `${qty(quote.tokensIn, symbol)} — pulled by the router, which needs an `
|
|
224
236
|
+ "ERC-20 approval first (below)"],
|
|
225
|
-
["
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
237
|
+
["fees in all", poolFeesLine(fees, quoteToken)],
|
|
238
|
+
["pool fee", `${lpFee(fees.lpFeePips)} — Uniswap's LP fee, taken by the pool from the tokens `
|
|
239
|
+
+ `you sell and kept by its liquidity: about ${qty(sellLpFee(quote.tokensIn, fees), symbol)}`],
|
|
240
|
+
["arcnow.io fee", `${money(quote.feeQuote)} — ${hookFeeRate(fees)}, taken by arcnow.io's `
|
|
241
|
+
+ `fee hook out of the ${quoteToken.symbol} the pool pays`],
|
|
229
242
|
["you receive", `${money(quote.quoteOut)} — net of both fees`],
|
|
230
243
|
["average fill price", avg === undefined
|
|
231
244
|
? "n/a"
|
|
232
245
|
: `${price(avg)} — what you receive, net of both fees, over what you give`],
|
|
233
|
-
]), againstSpot(spot, fill, "sell"), section("the approval a pool sell needs", [
|
|
246
|
+
]), poolFeeSplitSection(fees), againstSpot(spot, fill, "sell"), section("the approval a pool sell needs", [
|
|
234
247
|
["spender", `${router} — arcnow.io's v4 router`],
|
|
235
248
|
["holder", addr(holder)],
|
|
236
249
|
["approved now", qty(approved, symbol)],
|
|
@@ -242,7 +255,7 @@ export async function quotePoolSell(args, ctx, market, symbol) {
|
|
|
242
255
|
]), section(`minimum ${quoteToken.symbol} out, by tolerance`, TOLERANCES.map((bps) => [
|
|
243
256
|
`${bps} bps (${Number(bps) / 100}%)`,
|
|
244
257
|
money(minQuoteOutFromQuote(quote, Bps.of(bps)).ceilToRepresentable()),
|
|
245
|
-
])), note(spotNote(quoteToken)), note("A bonding-curve sell never needed an approval; a pool sell always does, because the "
|
|
258
|
+
])), note(spotNote(quoteToken, fees)), note("A bonding-curve sell never needed an approval; a pool sell always does, because the "
|
|
246
259
|
+ "router has no privileged path. This quote is a snapshot of one block.")),
|
|
247
260
|
};
|
|
248
261
|
}
|
package/dist/tools/pool.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool.js","sourceRoot":"","sources":["../../src/tools/pool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pool.js","sourceRoot":"","sources":["../../src/tools/pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,sFAAsF;cACvF,uEAAuE,CAAC,CAC7E;KACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/read.d.ts
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @module
|
|
15
15
|
*/
|
|
16
|
-
import type { FeeSplit } from "@arcnow/sdk";
|
|
17
16
|
import { QuoteAmount } from "@arcnow/sdk";
|
|
18
17
|
import { z } from "./schema.js";
|
|
19
18
|
import type { AnyTool } from "./schema.js";
|
|
@@ -21,6 +20,11 @@ import type { AnyTool } from "./schema.js";
|
|
|
21
20
|
export declare function quoteArg(): z.ZodOptional<z.ZodString>;
|
|
22
21
|
export declare const GRADUATING_BUY_WARNING: string;
|
|
23
22
|
export declare function statusLine(graduated: boolean, migrated: boolean): string;
|
|
24
|
-
|
|
23
|
+
/**
|
|
24
|
+
* A launch fee, as the registry reports it. Zero on every quote arcnow.io
|
|
25
|
+
* registers — launching is free — and said so; anything else is printed as the
|
|
26
|
+
* amount it is, because the figure is read, not assumed.
|
|
27
|
+
*/
|
|
28
|
+
export declare function launchFeeLine(fee: QuoteAmount): string;
|
|
25
29
|
export declare const READ_TOOLS: readonly AnyTool[];
|
|
26
30
|
//# sourceMappingURL=read.d.ts.map
|
package/dist/tools/read.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/tools/read.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/tools/read.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAML,WAAW,EAGZ,MAAM,aAAa,CAAC;AA0BrB,OAAO,EAAgF,CAAC,EAAE,MAAM,aAAa,CAAC;AAC9G,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,aAAa,CAAC;AA0wBxD,0CAA0C;AAC1C,wBAAgB,QAAQ,+BAOvB;AAgOD,eAAO,MAAM,sBAAsB,QAUoD,CAAC;AAExF,wBAAgB,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAQxE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,CAItD;AAMD,eAAO,MAAM,UAAU,EAAE,SAAS,OAAO,EAUxC,CAAC"}
|