Add mainnet cWBTC token-aggregation indexing, supply proof, and Etherscan verify scripts.
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m25s
CI/CD Pipeline / Security Scanning (push) Successful in 3m28s
CI/CD Pipeline / Lint and Format (push) Failing after 43s
CI/CD Pipeline / Terraform Validation (push) Failing after 25s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 28s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 45s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
Validation / validate-genesis (push) Successful in 32s
Validation / validate-terraform (push) Failing after 30s
Validation / validate-kubernetes (push) Failing after 10s
Validation / validate-smart-contracts (push) Failing after 10s
Validation / validate-security (push) Failing after 1m36s
Validation / validate-documentation (push) Failing after 17s
Verify Deployment / Verify Deployment (push) Failing after 48s
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m25s
CI/CD Pipeline / Security Scanning (push) Successful in 3m28s
CI/CD Pipeline / Lint and Format (push) Failing after 43s
CI/CD Pipeline / Terraform Validation (push) Failing after 25s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 28s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 45s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
Validation / validate-genesis (push) Successful in 32s
Validation / validate-terraform (push) Failing after 30s
Validation / validate-kubernetes (push) Failing after 10s
Validation / validate-smart-contracts (push) Failing after 10s
Validation / validate-security (push) Failing after 1m36s
Validation / validate-documentation (push) Failing after 17s
Verify Deployment / Verify Deployment (push) Failing after 48s
Wire live 0x2BBe3c… address into canonical tokens, pool catalog merge from mesh health, and bridge/cWBTC explorer verification helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -42,6 +42,7 @@ else
|
||||
fi
|
||||
|
||||
step "Ethereum Mainnet CCIP bridges" bash "$SCRIPT_DIR/verify-mainnet-etherscan.sh" || true
|
||||
step "Ethereum Mainnet CWMultiTokenBridgeL2" bash "$SCRIPT_DIR/verify-mainnet-cw-bridge-etherscan.sh" || true
|
||||
step "Ethereum Mainnet cW* (CompliantWrappedToken)" bash "$SCRIPT_DIR/verify-mainnet-cw-etherscan.sh" || true
|
||||
step "Multichain cW* (all CW*_* except MAINNET)" bash "$SCRIPT_DIR/verify-multichain-cw-etherscan.sh" || true
|
||||
step "Avalanche + Arbitrum WETH/CCIP bridges" bash "$SCRIPT_DIR/verify-deployed-contracts.sh" || true
|
||||
|
||||
120
scripts/deployment/verify-mainnet-cw-bridge-etherscan.sh
Executable file
120
scripts/deployment/verify-mainnet-cw-bridge-etherscan.sh
Executable file
@@ -0,0 +1,120 @@
|
||||
#!/usr/bin/env bash
|
||||
# Verify Ethereum Mainnet CWMultiTokenBridgeL2 (CW_BRIDGE_MAINNET) on Etherscan.
|
||||
#
|
||||
# Constructor: (sendRouter, receiveRouter, feeToken) — read from chain if unset.
|
||||
#
|
||||
# Usage:
|
||||
# cd smom-dbis-138 && ./scripts/deployment/verify-mainnet-cw-bridge-etherscan.sh
|
||||
# ./scripts/deployment/verify-mainnet-cw-bridge-etherscan.sh --dry-run
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
DRY_RUN=false
|
||||
for a in "$@"; do
|
||||
case "$a" in
|
||||
--dry-run) DRY_RUN=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -f "$SCRIPT_DIR/../lib/deployment/dotenv.sh" ]]; then
|
||||
# shellcheck disable=SC1090
|
||||
source "$SCRIPT_DIR/../lib/deployment/dotenv.sh"
|
||||
load_deployment_env --repo-root "${PROJECT_ROOT}"
|
||||
elif [[ -f "$PROJECT_ROOT/.env" ]]; then
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "$PROJECT_ROOT/.env"
|
||||
set +a
|
||||
fi
|
||||
|
||||
[[ -n "${ETHERSCAN_API_KEY:-}" ]] || {
|
||||
echo "ETHERSCAN_API_KEY not set" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
RPC="${ETHEREUM_MAINNET_RPC:-${ETH_MAINNET_RPC_URL:-https://ethereum-rpc.publicnode.com}}"
|
||||
BRIDGE="${CW_BRIDGE_MAINNET:-0x2bF74583206A49Be07E0E8A94197C12987AbD7B5}"
|
||||
|
||||
fetch_creation_ctor() {
|
||||
python3 - "$BRIDGE" "$ETHERSCAN_API_KEY" <<'PY'
|
||||
import json, sys, urllib.request
|
||||
bridge, api_key = sys.argv[1:3]
|
||||
url = (
|
||||
"https://api.etherscan.io/v2/api?chainid=1&module=contract&action=getcontractcreation"
|
||||
f"&contractaddresses={bridge}&apikey={api_key}"
|
||||
)
|
||||
with urllib.request.urlopen(url, timeout=30) as resp:
|
||||
doc = json.load(resp)
|
||||
rows = doc.get("result") or []
|
||||
if not rows:
|
||||
raise SystemExit("Etherscan getcontractcreation returned no rows")
|
||||
creation = (rows[0].get("creationBytecode") or "").lower().removeprefix("0x")
|
||||
if len(creation) < 192:
|
||||
raise SystemExit("creationBytecode too short")
|
||||
# constructor args are last 3 x 32-byte words
|
||||
args_hex = creation[-192:]
|
||||
words = [args_hex[i : i + 64] for i in range(0, 192, 64)]
|
||||
for w in words:
|
||||
print("0x" + w[-40:])
|
||||
PY
|
||||
}
|
||||
|
||||
SEND="${CW_BRIDGE_MAINNET_SEND_ROUTER:-}"
|
||||
RECV="${CW_BRIDGE_MAINNET_RECEIVE_ROUTER:-}"
|
||||
FEE="${CW_BRIDGE_MAINNET_FEE_TOKEN:-}"
|
||||
if [[ -z "$SEND" || -z "$RECV" || -z "$FEE" ]]; then
|
||||
mapfile -t _CTOR_ADDRS < <(fetch_creation_ctor 2>/dev/null || true)
|
||||
if [[ ${#_CTOR_ADDRS[@]} -eq 3 ]]; then
|
||||
SEND="${_CTOR_ADDRS[0]}"
|
||||
RECV="${_CTOR_ADDRS[1]}"
|
||||
FEE="${_CTOR_ADDRS[2]}"
|
||||
echo "Using deployment-time constructor args from Etherscan creation tx"
|
||||
else
|
||||
SEND="$(cast call "$BRIDGE" 'sendRouter()(address)' --rpc-url "$RPC")"
|
||||
RECV="$(cast call "$BRIDGE" 'receiveRouter()(address)' --rpc-url "$RPC")"
|
||||
FEE="$(cast call "$BRIDGE" 'feeToken()(address)' --rpc-url "$RPC")"
|
||||
echo "WARN: using live on-chain router fields (may differ from deploy immutables)" >&2
|
||||
fi
|
||||
fi
|
||||
|
||||
CTOR="$(cast abi-encode 'constructor(address,address,address)' "$SEND" "$RECV" "$FEE")"
|
||||
|
||||
echo "=== Verify CWMultiTokenBridgeL2 (CW_BRIDGE_MAINNET) ==="
|
||||
echo " bridge=$BRIDGE"
|
||||
echo " sendRouter=$SEND"
|
||||
echo " receiveRouter=$RECV"
|
||||
echo " feeToken=$FEE"
|
||||
|
||||
export FOUNDRY_SRC="contracts/bridge,contracts/interfaces"
|
||||
export FOUNDRY_OUT="out/scopes/bridge"
|
||||
export FOUNDRY_CACHE_PATH="cache/scopes/bridge"
|
||||
|
||||
if $DRY_RUN; then
|
||||
echo "forge verify-contract --chain-id 1 --num-of-optimizations 200 --via-ir \\"
|
||||
echo " --constructor-args \"$CTOR\" --etherscan-api-key \"\$ETHERSCAN_API_KEY\" \\"
|
||||
echo " \"$BRIDGE\" contracts/bridge/CWMultiTokenBridgeL2.sol:CWMultiTokenBridgeL2"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
bash "$PROJECT_ROOT/scripts/forge/scope.sh" build bridge -q
|
||||
|
||||
set +e
|
||||
out="$(forge verify-contract \
|
||||
--chain-id 1 \
|
||||
--num-of-optimizations 200 \
|
||||
--via-ir \
|
||||
--constructor-args "$CTOR" \
|
||||
--etherscan-api-key "$ETHERSCAN_API_KEY" \
|
||||
"$BRIDGE" \
|
||||
"contracts/bridge/CWMultiTokenBridgeL2.sol:CWMultiTokenBridgeL2" 2>&1)"
|
||||
rc=$?
|
||||
set -e
|
||||
echo "$out"
|
||||
if [[ $rc -eq 0 ]] || echo "$out" | grep -qiE 'already verified|Contract source code already verified'; then
|
||||
echo "OK: https://etherscan.io/address/$BRIDGE#code"
|
||||
exit 0
|
||||
fi
|
||||
exit "$rc"
|
||||
100
scripts/deployment/verify-mainnet-cwbtc-etherscan.sh
Executable file
100
scripts/deployment/verify-mainnet-cwbtc-etherscan.sh
Executable file
@@ -0,0 +1,100 @@
|
||||
#!/usr/bin/env bash
|
||||
# Verify mainnet cWBTC (CompliantWrappedToken) on Etherscan and write status JSON.
|
||||
#
|
||||
# Usage:
|
||||
# cd smom-dbis-138 && ./scripts/deployment/verify-mainnet-cwbtc-etherscan.sh
|
||||
# ./scripts/deployment/verify-mainnet-cwbtc-etherscan.sh --dry-run
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
PROXMOX="$(cd "$PROJECT_ROOT/.." && pwd)"
|
||||
REPORT="${PROXMOX}/reports/status/cwbtc-mainnet-etherscan-verify-latest.json"
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
DRY_RUN=false
|
||||
for a in "$@"; do
|
||||
case "$a" in
|
||||
--dry-run) DRY_RUN=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -f "$SCRIPT_DIR/../lib/deployment/dotenv.sh" ]]; then
|
||||
# shellcheck disable=SC1090
|
||||
source "$SCRIPT_DIR/../lib/deployment/dotenv.sh"
|
||||
load_deployment_env --repo-root "${PROJECT_ROOT}"
|
||||
fi
|
||||
|
||||
ADDR="${CWBTC_MAINNET:-0x2BBe3c809386FA5349EB2da31E0848ee9f54EE59}"
|
||||
ADMIN="${CW_VERIFY_ADMIN:-}"
|
||||
if [[ -z "$ADMIN" && -n "${PRIVATE_KEY:-}" ]]; then
|
||||
ADMIN="$(cast wallet address --private-key "$PRIVATE_KEY")"
|
||||
fi
|
||||
[[ -n "${ETHERSCAN_API_KEY:-}" ]] || { echo "ETHERSCAN_API_KEY required" >&2; exit 1; }
|
||||
[[ -n "$ADMIN" ]] || { echo "CW_VERIFY_ADMIN or PRIVATE_KEY required" >&2; exit 1; }
|
||||
|
||||
CTOR="$(cast abi-encode 'constructor(string,string,uint8,address)' 'Wrapped cBTC' 'cWBTC' 8 "$ADMIN")"
|
||||
|
||||
echo "=== Verify cWBTC on Etherscan ==="
|
||||
echo " address=$ADDR admin=$ADMIN"
|
||||
|
||||
export FOUNDRY_SRC="contracts/tokens,contracts/interfaces"
|
||||
export FOUNDRY_OUT="out/scopes/tokens"
|
||||
export FOUNDRY_CACHE_PATH="cache/scopes/tokens"
|
||||
|
||||
if $DRY_RUN; then
|
||||
echo "forge verify-contract --chain-id 1 --num-of-optimizations 200 --via-ir \\"
|
||||
echo " --constructor-args \"$CTOR\" --etherscan-api-key \"\$ETHERSCAN_API_KEY\" \\"
|
||||
echo " \"$ADDR\" contracts/tokens/CompliantWrappedToken.sol:CompliantWrappedToken"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
bash "$PROJECT_ROOT/scripts/forge/scope.sh" build tokens -q
|
||||
|
||||
status="failed"
|
||||
msg=""
|
||||
set +e
|
||||
out="$(forge verify-contract \
|
||||
--chain-id 1 \
|
||||
--num-of-optimizations 200 \
|
||||
--via-ir \
|
||||
--constructor-args "$CTOR" \
|
||||
--etherscan-api-key "$ETHERSCAN_API_KEY" \
|
||||
"$ADDR" \
|
||||
"contracts/tokens/CompliantWrappedToken.sol:CompliantWrappedToken" 2>&1)"
|
||||
rc=$?
|
||||
set -e
|
||||
echo "$out"
|
||||
if [[ $rc -eq 0 ]] || echo "$out" | grep -qiE 'already verified|Contract source code already verified'; then
|
||||
status="verified"
|
||||
msg="ok"
|
||||
else
|
||||
msg="${out:0:500}"
|
||||
exit "$rc"
|
||||
fi
|
||||
|
||||
mkdir -p "$(dirname "$REPORT")"
|
||||
python3 - "$REPORT" "$ADDR" "$ADMIN" "$status" "$msg" <<'PY'
|
||||
import datetime, json, sys
|
||||
path, addr, admin, status, msg = sys.argv[1:6]
|
||||
doc = {
|
||||
"generatedAt": datetime.datetime.utcnow().replace(microsecond=0).isoformat() + "Z",
|
||||
"chainId": 1,
|
||||
"symbol": "cWBTC",
|
||||
"address": addr,
|
||||
"constructorAdmin": admin,
|
||||
"etherscanUrl": f"https://etherscan.io/address/{addr}",
|
||||
"etherscanCodeUrl": f"https://etherscan.io/address/{addr}#code",
|
||||
"verifyStatus": status,
|
||||
"message": msg,
|
||||
"tokenLists": [
|
||||
"token-lists/lists/ethereum-mainnet.tokenlist.json",
|
||||
"smom-dbis-138/services/token-aggregation/config/token-lists/ethereum-mainnet.tokenlist.json",
|
||||
],
|
||||
}
|
||||
open(path, "w", encoding="utf-8").write(json.dumps(doc, indent=2) + "\n")
|
||||
print(path)
|
||||
PY
|
||||
|
||||
echo "Published status: $REPORT"
|
||||
echo "Etherscan: https://etherscan.io/address/$ADDR#code"
|
||||
@@ -1,468 +1,55 @@
|
||||
{
|
||||
"schema": "token-aggregation-live-uniswap-v2-pool-catalog/v1",
|
||||
"generatedAt": "2026-05-09T05:43:40.305Z",
|
||||
"generatedAt": "2026-06-13T17:50:04.195Z",
|
||||
"sourceArtifacts": [
|
||||
"reports/extraction/promod-uniswap-v2-live-pair-discovery-latest.json",
|
||||
"cross-chain-pmm-lps/config/deployment-status.json"
|
||||
"cross-chain-pmm-lps/config/deployment-status.json",
|
||||
"reports/status/mainnet-cwbtc-pools-health-latest.json"
|
||||
],
|
||||
"poolCount": 19,
|
||||
"positiveLiquidityPoolCount": 19,
|
||||
"poolCount": 2,
|
||||
"positiveLiquidityPoolCount": 2,
|
||||
"pools": [
|
||||
{
|
||||
"chainId": 1,
|
||||
"chainName": "Ethereum Mainnet",
|
||||
"poolAddress": "0x422608c5ddff909675ac2c5f872fd42f16b9287a",
|
||||
"poolAddress": "0x417ac40f2c1fd5feb9708b3e8b918bc35834869e",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
|
||||
"routerAddress": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0xaf5017d0163ecb99d9b5d94e3b4d7b09af44d8ae",
|
||||
"quoteAddress": "0x2de5f116bfce3d0f922d9c8351e0c5fc24b9284a",
|
||||
"baseReserveRaw": "9900803423129",
|
||||
"quoteReserveRaw": "9900803423131",
|
||||
"baseReserveUnits": "9900803.423129",
|
||||
"quoteReserveUnits": "9900803.423131",
|
||||
"priceQuotePerBase": "1.000000000000202003808633131",
|
||||
"deviationBps": "2.020038086331310000E-9",
|
||||
"baseSymbol": "cWBTC",
|
||||
"quoteSymbol": "cWUSDT",
|
||||
"baseAddress": "0x2bbe3c809386fa5349eb2da31e0848ee9f54ee59",
|
||||
"quoteAddress": "0xaf5017d0163ecb99d9b5d94e3b4d7b09af44d8ae",
|
||||
"baseReserveRaw": "10000000",
|
||||
"quoteReserveRaw": "50000000000",
|
||||
"baseReserveUnits": "0.1",
|
||||
"quoteReserveUnits": "50000",
|
||||
"healthy": true,
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 9900803.423129,
|
||||
"reserve1Usd": 9900803.423131,
|
||||
"totalLiquidityUsd": 19801606.84626
|
||||
"reserve0Usd": 6389.6977050000005,
|
||||
"reserve1Usd": 50000,
|
||||
"totalLiquidityUsd": 56389.697705,
|
||||
"sourceArtifact": "reports/status/mainnet-cwbtc-pools-health-latest.json"
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"chainName": "Ethereum Mainnet",
|
||||
"poolAddress": "0xc28706f899266b36bc43cc072b3a921bdf2c48d9",
|
||||
"poolAddress": "0x6321748737c5877b7d9da00c455278df4debbec0",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
|
||||
"routerAddress": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
|
||||
"baseSymbol": "cWUSDC",
|
||||
"quoteSymbol": "USDC",
|
||||
"baseAddress": "0x2de5f116bfce3d0f922d9c8351e0c5fc24b9284a",
|
||||
"quoteAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
||||
"baseReserveRaw": "1267071063797",
|
||||
"quoteReserveRaw": "2167762",
|
||||
"baseReserveUnits": "1267071.063797",
|
||||
"quoteReserveUnits": "2.167762",
|
||||
"priceQuotePerBase": "0.000001710844846779092339761738687",
|
||||
"deviationBps": "9999.982891551532209076602383",
|
||||
"depthOk": false,
|
||||
"parityOk": false,
|
||||
"healthy": false,
|
||||
"reserve0Usd": 1267071.063797,
|
||||
"reserve1Usd": 2.167762,
|
||||
"totalLiquidityUsd": 1267073.2315590002
|
||||
},
|
||||
{
|
||||
"chainId": 10,
|
||||
"chainName": "Optimism",
|
||||
"poolAddress": "0xe28bff306442a8a512d2441847c27211a7c4c613",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf",
|
||||
"routerAddress": "0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"baseSymbol": "cWBTC",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0x04b2ae3c3bb3d70df506fad8717b0fbfc78ed7e6",
|
||||
"quoteAddress": "0x377a5faa3162b3fc6f4e267301a3c817bad18105",
|
||||
"baseReserveRaw": "3000000000",
|
||||
"quoteReserveRaw": "3000000000",
|
||||
"baseReserveUnits": "3000",
|
||||
"quoteReserveUnits": "3000",
|
||||
"priceQuotePerBase": "1",
|
||||
"deviationBps": "0",
|
||||
"baseAddress": "0x2bbe3c809386fa5349eb2da31e0848ee9f54ee59",
|
||||
"quoteAddress": "0x2de5f116bfce3d0f922d9c8351e0c5fc24b9284a",
|
||||
"baseReserveRaw": "10000000",
|
||||
"quoteReserveRaw": "100000000000",
|
||||
"baseReserveUnits": "0.1",
|
||||
"quoteReserveUnits": "100000",
|
||||
"healthy": true,
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 3000,
|
||||
"reserve1Usd": 3000,
|
||||
"totalLiquidityUsd": 6000
|
||||
},
|
||||
{
|
||||
"chainId": 25,
|
||||
"chainName": "Cronos",
|
||||
"poolAddress": "0x438d8e1a8e311d2ae4b75a38e0044675fd324133",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x3B44B2a187a7b3824131F8db5a74194D0a42Fc15",
|
||||
"routerAddress": "0x145863Eb42Cf62847A6Ca784e6416C1682b1b2Ae",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0x72948a7a813b60b37cd0c920c4657dbff54312b8",
|
||||
"quoteAddress": "0x932566e5bb6bebf6b035b94f3de1f75f126304ec",
|
||||
"baseReserveRaw": "3000000000",
|
||||
"quoteReserveRaw": "3000000000",
|
||||
"baseReserveUnits": "3000",
|
||||
"quoteReserveUnits": "3000",
|
||||
"priceQuotePerBase": "1",
|
||||
"deviationBps": "0",
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 3000,
|
||||
"reserve1Usd": 3000,
|
||||
"totalLiquidityUsd": 6000
|
||||
},
|
||||
{
|
||||
"chainId": 56,
|
||||
"chainName": "BSC (BNB Chain)",
|
||||
"poolAddress": "0x639d7e64c6f1fc676226f20a0c42aecdd66545e8",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",
|
||||
"routerAddress": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
|
||||
"baseSymbol": "cWAUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0xe1a51bc037a79ab36767561b147eb41780124934",
|
||||
"quoteAddress": "0x5355148c4740fcc3d7a96f05edd89ab14851206b",
|
||||
"baseReserveRaw": "1500000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1500",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "0.6666666666666666666666666667",
|
||||
"deviationBps": "3333.333333333333333333333333",
|
||||
"depthOk": true,
|
||||
"parityOk": false,
|
||||
"healthy": false,
|
||||
"reserve0Usd": 1500,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2500
|
||||
},
|
||||
{
|
||||
"chainId": 56,
|
||||
"chainName": "BSC (BNB Chain)",
|
||||
"poolAddress": "0x7e308c12bd609607df9c4137e30235d5a9da2a64",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",
|
||||
"routerAddress": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0x9a1d0dbee997929ed02fd19e0e199704d20914db",
|
||||
"quoteAddress": "0x5355148c4740fcc3d7a96f05edd89ab14851206b",
|
||||
"baseReserveRaw": "3000000000",
|
||||
"quoteReserveRaw": "3000000000",
|
||||
"baseReserveUnits": "3000",
|
||||
"quoteReserveUnits": "3000",
|
||||
"priceQuotePerBase": "1",
|
||||
"deviationBps": "0",
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 3000,
|
||||
"reserve1Usd": 3000,
|
||||
"totalLiquidityUsd": 6000
|
||||
},
|
||||
{
|
||||
"chainId": 56,
|
||||
"chainName": "BSC (BNB Chain)",
|
||||
"poolAddress": "0xe9b082baa73fa4dec7cb3cbd99b19d30bbfe1523",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",
|
||||
"routerAddress": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
|
||||
"baseSymbol": "cWAUSDT",
|
||||
"quoteSymbol": "cWUSDT",
|
||||
"baseAddress": "0xe1a51bc037a79ab36767561b147eb41780124934",
|
||||
"quoteAddress": "0x9a1d0dbee997929ed02fd19e0e199704d20914db",
|
||||
"baseReserveRaw": "1500000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1500",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "0.6666666666666666666666666667",
|
||||
"deviationBps": "3333.333333333333333333333333",
|
||||
"depthOk": true,
|
||||
"parityOk": false,
|
||||
"healthy": false,
|
||||
"reserve0Usd": 1500,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2500
|
||||
},
|
||||
{
|
||||
"chainId": 100,
|
||||
"chainName": "Gnosis Chain",
|
||||
"poolAddress": "0x064d782be0113cb427f3af0de9335c9f34a1de34",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4",
|
||||
"routerAddress": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0x0cb0192c056aa425c557bdead8e56c7eeabf7acf",
|
||||
"quoteAddress": "0xd6969bc19b53f866c64f2148ae271b2dae0c58e4",
|
||||
"baseReserveRaw": "4000000000",
|
||||
"quoteReserveRaw": "4000000000",
|
||||
"baseReserveUnits": "4000",
|
||||
"quoteReserveUnits": "4000",
|
||||
"priceQuotePerBase": "1",
|
||||
"deviationBps": "0",
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 4000,
|
||||
"reserve1Usd": 4000,
|
||||
"totalLiquidityUsd": 8000
|
||||
},
|
||||
{
|
||||
"chainId": 137,
|
||||
"chainName": "Polygon",
|
||||
"poolAddress": "0x3411a20c39773d1a18cb53864893b236f41f1e99",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",
|
||||
"routerAddress": "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0x0cb0192c056aa425c557bdead8e56c7eeabf7acf",
|
||||
"quoteAddress": "0xd6969bc19b53f866c64f2148ae271b2dae0c58e4",
|
||||
"baseReserveRaw": "10994302668",
|
||||
"quoteReserveRaw": "10996392462",
|
||||
"baseReserveUnits": "10994.302668",
|
||||
"quoteReserveUnits": "10996.392462",
|
||||
"priceQuotePerBase": "1.000190079722480494476414209",
|
||||
"deviationBps": "1.900797224804944764142090000",
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 10994.302668,
|
||||
"reserve1Usd": 10996.392462,
|
||||
"totalLiquidityUsd": 21990.69513
|
||||
},
|
||||
{
|
||||
"chainId": 137,
|
||||
"chainName": "Polygon",
|
||||
"poolAddress": "0x8cd2cb42b81f894eb10d15446db22a3b31d6fb2e",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",
|
||||
"routerAddress": "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",
|
||||
"baseSymbol": "cWAUSDT",
|
||||
"quoteSymbol": "cWUSDT",
|
||||
"baseAddress": "0xf12e262f85107df26741726b074606cafa24aae7",
|
||||
"quoteAddress": "0x0cb0192c056aa425c557bdead8e56c7eeabf7acf",
|
||||
"baseReserveRaw": "1500000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1500",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "0.6666666666666666666666666667",
|
||||
"deviationBps": "3333.333333333333333333333333",
|
||||
"depthOk": true,
|
||||
"parityOk": false,
|
||||
"healthy": false,
|
||||
"reserve0Usd": 1500,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2500
|
||||
},
|
||||
{
|
||||
"chainId": 137,
|
||||
"chainName": "Polygon",
|
||||
"poolAddress": "0xe6a5cb164d4af7e9794aed09ec373392d0e7216c",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",
|
||||
"routerAddress": "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",
|
||||
"baseSymbol": "cWAUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0xf12e262f85107df26741726b074606cafa24aae7",
|
||||
"quoteAddress": "0xd6969bc19b53f866c64f2148ae271b2dae0c58e4",
|
||||
"baseReserveRaw": "1500000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1500",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "0.6666666666666666666666666667",
|
||||
"deviationBps": "3333.333333333333333333333333",
|
||||
"depthOk": true,
|
||||
"parityOk": false,
|
||||
"healthy": false,
|
||||
"reserve0Usd": 1500,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2500
|
||||
},
|
||||
{
|
||||
"chainId": 8453,
|
||||
"chainName": "Base",
|
||||
"poolAddress": "0x56eb93f747d3b8251d43849cc72b39c1899fcaca",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x02a84c1b3BBD7401a5f7fa98a384EBC70bB5749E",
|
||||
"routerAddress": "0x8cFe327CEc66d1C090Dd72bd0FF11d690C33a2Eb",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0x04b2ae3c3bb3d70df506fad8717b0fbfc78ed7e6",
|
||||
"quoteAddress": "0x377a5faa3162b3fc6f4e267301a3c817bad18105",
|
||||
"baseReserveRaw": "1000000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1000",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "1",
|
||||
"deviationBps": "0",
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 1000,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2000
|
||||
},
|
||||
{
|
||||
"chainId": 42161,
|
||||
"chainName": "Arbitrum One",
|
||||
"poolAddress": "0x2b2ea2ea9e7617de09fcb5063befafa01a9ef2b4",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x02a84c1b3BBD7401a5f7fa98a384EBC70bB5749E",
|
||||
"routerAddress": "0x8cFe327CEc66d1C090Dd72bd0FF11d690C33a2Eb",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0x73adaf7dba95221c080db5631466d2bc54f6a76b",
|
||||
"quoteAddress": "0x0cb0192c056aa425c557bdead8e56c7eeabf7acf",
|
||||
"baseReserveRaw": "3000000000",
|
||||
"quoteReserveRaw": "3000000000",
|
||||
"baseReserveUnits": "3000",
|
||||
"quoteReserveUnits": "3000",
|
||||
"priceQuotePerBase": "1",
|
||||
"deviationBps": "0",
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 3000,
|
||||
"reserve1Usd": 3000,
|
||||
"totalLiquidityUsd": 6000
|
||||
},
|
||||
{
|
||||
"chainId": 42220,
|
||||
"chainName": "Celo",
|
||||
"poolAddress": "0x6f97de8ab68c722dcbc02cea0ce6b587b8210052",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x62d5b84bE28a183aBB507E125B384122D2C25fAE",
|
||||
"routerAddress": "0xE3D8bd6Aed4F159bc8000a9cD47CffDb95F96121",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0x73376eb92c16977b126db9112936a20fa0de3442",
|
||||
"quoteAddress": "0x4c38f9a5ed68a04cd28a72e8c68c459ec34576f3",
|
||||
"baseReserveRaw": "1000000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1000",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "1",
|
||||
"deviationBps": "0",
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 1000,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2000
|
||||
},
|
||||
{
|
||||
"chainId": 42220,
|
||||
"chainName": "Celo",
|
||||
"poolAddress": "0xd3b55d6d7c08fdbf5f201e486992643cff410d91",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x62d5b84bE28a183aBB507E125B384122D2C25fAE",
|
||||
"routerAddress": "0xE3D8bd6Aed4F159bc8000a9cD47CffDb95F96121",
|
||||
"baseSymbol": "cWAUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0xc158b6cd3a3088c52f797d41f5aa02825361629e",
|
||||
"quoteAddress": "0x4c38f9a5ed68a04cd28a72e8c68c459ec34576f3",
|
||||
"baseReserveRaw": "1500000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1500",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "0.6666666666666666666666666667",
|
||||
"deviationBps": "3333.333333333333333333333333",
|
||||
"depthOk": true,
|
||||
"parityOk": false,
|
||||
"healthy": false,
|
||||
"reserve0Usd": 1500,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2500
|
||||
},
|
||||
{
|
||||
"chainId": 42220,
|
||||
"chainName": "Celo",
|
||||
"poolAddress": "0xee9eebf89c1424e63efc888929e43a9423357d39",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x62d5b84bE28a183aBB507E125B384122D2C25fAE",
|
||||
"routerAddress": "0xE3D8bd6Aed4F159bc8000a9cD47CffDb95F96121",
|
||||
"baseSymbol": "cWAUSDT",
|
||||
"quoteSymbol": "cWUSDT",
|
||||
"baseAddress": "0xc158b6cd3a3088c52f797d41f5aa02825361629e",
|
||||
"quoteAddress": "0x73376eb92c16977b126db9112936a20fa0de3442",
|
||||
"baseReserveRaw": "1500000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1500",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "0.6666666666666666666666666667",
|
||||
"deviationBps": "3333.333333333333333333333333",
|
||||
"depthOk": true,
|
||||
"parityOk": false,
|
||||
"healthy": false,
|
||||
"reserve0Usd": 1500,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2500
|
||||
},
|
||||
{
|
||||
"chainId": 43114,
|
||||
"chainName": "Avalanche C-Chain",
|
||||
"poolAddress": "0x418322f48d857277ec4bcc96bc1580accb7ea253",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x9Ad6C38BE94206cA50bb0d90783181662f0Cfa10",
|
||||
"routerAddress": "0x60aE616a2155Ee3d9A68541Ba4544862310933d4",
|
||||
"baseSymbol": "cWAUSDT",
|
||||
"quoteSymbol": "cWUSDT",
|
||||
"baseAddress": "0xff3084410a732231472ee9f93f5855da89cc5254",
|
||||
"quoteAddress": "0x8142ba530b08f3950128601f00daaa678213dfdf",
|
||||
"baseReserveRaw": "1500000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1500",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "0.6666666666666666666666666667",
|
||||
"deviationBps": "3333.333333333333333333333333",
|
||||
"depthOk": true,
|
||||
"parityOk": false,
|
||||
"healthy": false,
|
||||
"reserve0Usd": 1500,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2500
|
||||
},
|
||||
{
|
||||
"chainId": 43114,
|
||||
"chainName": "Avalanche C-Chain",
|
||||
"poolAddress": "0x79c8ea153e77bc69b989f59f69bfa44c466d5dee",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x9Ad6C38BE94206cA50bb0d90783181662f0Cfa10",
|
||||
"routerAddress": "0x60aE616a2155Ee3d9A68541Ba4544862310933d4",
|
||||
"baseSymbol": "cWUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0x8142ba530b08f3950128601f00daaa678213dfdf",
|
||||
"quoteAddress": "0x0c242b513008cd49c89078f5afb237a3112251eb",
|
||||
"baseReserveRaw": "10000800000",
|
||||
"quoteReserveRaw": "10000800000",
|
||||
"baseReserveUnits": "10000.8",
|
||||
"quoteReserveUnits": "10000.8",
|
||||
"priceQuotePerBase": "1",
|
||||
"deviationBps": "0",
|
||||
"depthOk": true,
|
||||
"parityOk": true,
|
||||
"healthy": true,
|
||||
"reserve0Usd": 10000.8,
|
||||
"reserve1Usd": 10000.8,
|
||||
"totalLiquidityUsd": 20001.6
|
||||
},
|
||||
{
|
||||
"chainId": 43114,
|
||||
"chainName": "Avalanche C-Chain",
|
||||
"poolAddress": "0xaad6aed8d28b0195d19b4d17f8ee9a1837ff2dce",
|
||||
"dex": "uniswap_v2",
|
||||
"factoryAddress": "0x9Ad6C38BE94206cA50bb0d90783181662f0Cfa10",
|
||||
"routerAddress": "0x60aE616a2155Ee3d9A68541Ba4544862310933d4",
|
||||
"baseSymbol": "cWAUSDT",
|
||||
"quoteSymbol": "cWUSDC",
|
||||
"baseAddress": "0xff3084410a732231472ee9f93f5855da89cc5254",
|
||||
"quoteAddress": "0x0c242b513008cd49c89078f5afb237a3112251eb",
|
||||
"baseReserveRaw": "1500000000",
|
||||
"quoteReserveRaw": "1000000000",
|
||||
"baseReserveUnits": "1500",
|
||||
"quoteReserveUnits": "1000",
|
||||
"priceQuotePerBase": "0.6666666666666666666666666667",
|
||||
"deviationBps": "3333.333333333333333333333333",
|
||||
"depthOk": true,
|
||||
"parityOk": false,
|
||||
"healthy": false,
|
||||
"reserve0Usd": 1500,
|
||||
"reserve1Usd": 1000,
|
||||
"totalLiquidityUsd": 2500
|
||||
"reserve0Usd": 6389.6977050000005,
|
||||
"reserve1Usd": 100000,
|
||||
"totalLiquidityUsd": 106389.697705,
|
||||
"sourceArtifact": "reports/status/mainnet-cwbtc-pools-health-latest.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,10 +2,10 @@
|
||||
"name": "DBIS Ethereum Mainnet GRU",
|
||||
"version": {
|
||||
"major": 1,
|
||||
"minor": 1,
|
||||
"minor": 2,
|
||||
"patch": 0
|
||||
},
|
||||
"timestamp": "2026-06-06T00:00:00.000Z",
|
||||
"timestamp": "2026-06-12T00:00:00.000Z",
|
||||
"logoURI": "https://d-bis.org/tokens/cwusdc.svg",
|
||||
"keywords": [
|
||||
"ethereum",
|
||||
@@ -13,9 +13,40 @@
|
||||
"stablecoin",
|
||||
"gru",
|
||||
"dbis",
|
||||
"cwusdc"
|
||||
"cwusdc",
|
||||
"cw",
|
||||
"wrapped"
|
||||
],
|
||||
"tokens": [
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0xaF5017d0163ecb99D9B5D94e3b4D7b09Af44D8AE",
|
||||
"name": "Wrapped cUSDT",
|
||||
"symbol": "cWUSDT",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwusdt.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"cash",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "USD",
|
||||
"gruFamily": "cUSDT",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0x93E66202A11B1772E55407B32B44e5Cd8eda7f22",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0x2de5F116bFcE3d0f922d9C8351e0c5Fc24b9284a",
|
||||
@@ -36,38 +67,341 @@
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "USD",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy",
|
||||
"gruVersion": "v1",
|
||||
"gruFamily": "cUSDC",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0xf22258f57794CC8E06237084b353Ab30fFfa640b"
|
||||
"canonicalSourceAddress": "0xf22258f57794CC8E06237084b353Ab30fFfa640b",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
||||
"name": "Tether USD",
|
||||
"symbol": "USDT",
|
||||
"address": "0xD4aEAa8cD3fB41Dc8437FaC7639B6d91B60A5e8d",
|
||||
"name": "Wrapped cEURC",
|
||||
"symbol": "cWEURC",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",
|
||||
"logoURI": "https://d-bis.org/tokens/cweurc.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"cash"
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "fiat-backed-stablecoin",
|
||||
"currency": "USD",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "EUR",
|
||||
"gruFamily": "cEURC",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0x8085961F9cF02b4d800A3c6d386D31da4B34266a",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents",
|
||||
"x402Ready": false,
|
||||
"fwdCanon": false,
|
||||
"walletClass": "cash-like-token"
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0x855d74FFB6CF75721a9bAbc8B2ed35c8119241dC",
|
||||
"name": "Wrapped cEURT",
|
||||
"symbol": "cWEURT",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cweurt.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "EUR",
|
||||
"gruFamily": "cEURT",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0xdf4b71c61E5912712C1Bdd451416B9aC26949d72",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0xc074007dc0bfb384b1cf6426a56287ed23fe4d52",
|
||||
"name": "Wrapped cGBPC",
|
||||
"symbol": "cWGBPC",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwgbpc.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "GBP",
|
||||
"gruFamily": "cGBPC",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0x003960f16D9d34F2e98d62723B6721Fb92074aD2",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0x1dDF9970F01c76A692Fdba2706203E6f16e0C46F",
|
||||
"name": "Wrapped cGBPT",
|
||||
"symbol": "cWGBPT",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwgbpt.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "GBP",
|
||||
"gruFamily": "cGBPT",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0x350f54e4D23795f86A9c03988c7135357CCaD97c",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0x5020Db641B3Fc0dAbBc0c688C845bc4E3699f35F",
|
||||
"name": "Wrapped cAUDC",
|
||||
"symbol": "cWAUDC",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwaudc.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "AUD",
|
||||
"gruFamily": "cAUDC",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0xD51482e567c03899eecE3CAe8a058161FD56069D",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0x07EEd0D7dD40984e47B9D3a3bdded1c536435582",
|
||||
"name": "Wrapped cJPYC",
|
||||
"symbol": "cWJPYC",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwjpyc.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "JPY",
|
||||
"gruFamily": "cJPYC",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0xEe269e1226a334182aace90056EE4ee5Cc8A6770",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0x0F91C5E6Ddd46403746aAC970D05d70FFe404780",
|
||||
"name": "Wrapped cCHFC",
|
||||
"symbol": "cWCHFC",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwchfc.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "CHF",
|
||||
"gruFamily": "cCHFC",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0x873990849DDa5117d7C644f0aF24370797C03885",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0x209FE32fe7B541751D190ae4e50cd005DcF8EDb4",
|
||||
"name": "Wrapped cCADC",
|
||||
"symbol": "cWCADC",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwcadc.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "CAD",
|
||||
"gruFamily": "cCADC",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0x54dBd40cF05e15906A2C21f600937e96787f5679",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0x572Be0fa8CA0534d642A567CEDb398B771D8a715",
|
||||
"name": "Wrapped cXAUC",
|
||||
"symbol": "cWXAUC",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwxauc.svg",
|
||||
"tags": [
|
||||
"defi",
|
||||
"compliant",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "gru-emoney",
|
||||
"instrument": "commodity-referenced-token",
|
||||
"currency": "XAU",
|
||||
"gruFamily": "cXAUC",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0x290E52a8819A4fbD0714E517225429aA2B70EC6b",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "commodity",
|
||||
"cashLike": false,
|
||||
"backing": "commodity-reserves"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0xACE1DBF857549a11aF1322e1f91F2F64b029c906",
|
||||
"name": "Wrapped cXAUT",
|
||||
"symbol": "cWXAUT",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwxaut.svg",
|
||||
"tags": [
|
||||
"defi",
|
||||
"compliant",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "gru-emoney",
|
||||
"instrument": "commodity-referenced-token",
|
||||
"currency": "XAU",
|
||||
"gruFamily": "cXAUT",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0x94e408E26c6FD8F4ee00b54dF19082FDA07dC96E",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "commodity",
|
||||
"cashLike": false,
|
||||
"backing": "commodity-reserves"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0x2BBe3c809386FA5349EB2da31E0848ee9f54EE59",
|
||||
"name": "Wrapped cBTC",
|
||||
"symbol": "cWBTC",
|
||||
"decimals": 8,
|
||||
"logoURI": "https://d-bis.org/tokens/cwbtc.svg",
|
||||
"tags": [
|
||||
"defi",
|
||||
"compliant",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "gru-emoney",
|
||||
"instrument": "commodity-referenced-token",
|
||||
"currency": "BTC",
|
||||
"gruFamily": "cBTC",
|
||||
"canonicalSourceChainId": 138,
|
||||
"canonicalSourceAddress": "0xe94260c555ac1d9d3cc9e1632883452ebdf0082e",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "commodity",
|
||||
"cashLike": false,
|
||||
"backing": "commodity-reserves"
|
||||
}
|
||||
},
|
||||
{
|
||||
"chainId": 1,
|
||||
"address": "0xe1a51Bc037a79AB36767561B147eb41780124934",
|
||||
"name": "Wrapped cAUSDT",
|
||||
"symbol": "cWAUSDT",
|
||||
"decimals": 6,
|
||||
"logoURI": "https://d-bis.org/tokens/cwausdt.svg",
|
||||
"tags": [
|
||||
"stablecoin",
|
||||
"defi",
|
||||
"compliant",
|
||||
"fiat",
|
||||
"gru",
|
||||
"wrapped"
|
||||
],
|
||||
"extensions": {
|
||||
"category": "tokenized-fiat",
|
||||
"instrument": "emoney-wrapped-transport",
|
||||
"currency": "USD",
|
||||
"gruFamily": "cAUSDT",
|
||||
"gruVersion": "v1",
|
||||
"settlement": "fiat",
|
||||
"cashLike": true,
|
||||
"backing": "cash,cash-equivalents,gru-reserve-policy"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -48,6 +48,8 @@ const PRICE_USD: Record<string, number> = {
|
||||
cWUSDC: 1,
|
||||
cWUSDT: 1,
|
||||
cWAUSDT: 1,
|
||||
BTC: Number(process.env.CANONICAL_PRICE_USD_BTC || process.env.BTC_PRICE_USD || 90000),
|
||||
cWBTC: Number(process.env.CANONICAL_PRICE_USD_BTC || process.env.BTC_PRICE_USD || 90000),
|
||||
};
|
||||
|
||||
function findRepoRoot(): string {
|
||||
@@ -85,73 +87,166 @@ function parsePositiveNumber(value?: string): number {
|
||||
return Number.isFinite(parsed) && parsed > 0 ? parsed : 0;
|
||||
}
|
||||
|
||||
type CwbtcPoolHealth = {
|
||||
id?: string;
|
||||
pair?: string;
|
||||
venue?: string;
|
||||
poolAddress?: string;
|
||||
live?: boolean;
|
||||
baseReserveRaw?: string;
|
||||
quoteReserveRaw?: string;
|
||||
errors?: string[];
|
||||
};
|
||||
|
||||
type CwbtcPoolsHealthPayload = {
|
||||
chainId?: number;
|
||||
tokenAddress?: string;
|
||||
token?: { symbol?: string; addressDefault?: string; decimals?: number };
|
||||
quoteTokens?: Record<string, string>;
|
||||
pools?: CwbtcPoolHealth[];
|
||||
};
|
||||
|
||||
function mergeCwbtcMeshPools(repoRoot: string, pools: Array<Record<string, unknown>>): void {
|
||||
const healthPath = path.join(repoRoot, 'reports/status/mainnet-cwbtc-pools-health-latest.json');
|
||||
const poolsConfigPath = path.join(repoRoot, 'config/engine/mainnet-cwbtc-pools.v1.json');
|
||||
if (!fs.existsSync(healthPath) || !fs.existsSync(poolsConfigPath)) return;
|
||||
|
||||
const health = readJson<CwbtcPoolsHealthPayload>(healthPath);
|
||||
const poolsConfig = readJson<{ quoteTokens?: Record<string, string> }>(poolsConfigPath);
|
||||
const chainId = Number(health.chainId ?? 1);
|
||||
const cwbtcAddress = String(health.tokenAddress ?? health.token?.addressDefault ?? '').toLowerCase();
|
||||
const quoteTokens = { ...(poolsConfig.quoteTokens ?? {}), ...(health.quoteTokens ?? {}) };
|
||||
const existing = new Set(pools.map((pool) => String(pool.poolAddress).toLowerCase()));
|
||||
|
||||
for (const row of health.pools ?? []) {
|
||||
if (!row.live || row.venue !== 'uniswap_v2') continue;
|
||||
const poolAddress = String(row.poolAddress ?? '').toLowerCase();
|
||||
if (!poolAddress.startsWith('0x') || existing.has(poolAddress)) continue;
|
||||
|
||||
const [baseSymbol, quoteSymbol] = String(row.pair ?? '/').split('/');
|
||||
const baseAddress =
|
||||
baseSymbol === 'cWBTC' ? cwbtcAddress : String(quoteTokens[baseSymbol] ?? '').toLowerCase();
|
||||
const quoteAddress =
|
||||
quoteSymbol === 'cWBTC' ? cwbtcAddress : String(quoteTokens[quoteSymbol] ?? '').toLowerCase();
|
||||
if (!baseAddress.startsWith('0x') || !quoteAddress.startsWith('0x')) continue;
|
||||
|
||||
const baseDecimals = baseSymbol === 'cWBTC' ? 8 : 6;
|
||||
const quoteDecimals = quoteSymbol === 'cWBTC' ? 8 : 6;
|
||||
const baseReserveRaw = parsePositiveNumber(row.baseReserveRaw);
|
||||
const quoteReserveRaw = parsePositiveNumber(row.quoteReserveRaw);
|
||||
if (baseReserveRaw <= 0 && quoteReserveRaw <= 0) continue;
|
||||
|
||||
const baseReserveUnits = baseReserveRaw / 10 ** baseDecimals;
|
||||
const quoteReserveUnits = quoteReserveRaw / 10 ** quoteDecimals;
|
||||
const basePriceUsd = PRICE_USD[baseSymbol] ?? 0;
|
||||
const quotePriceUsd = PRICE_USD[quoteSymbol] ?? 0;
|
||||
const reserve0Usd = baseReserveUnits * basePriceUsd;
|
||||
const reserve1Usd = quoteReserveUnits * quotePriceUsd;
|
||||
const totalLiquidityUsd = reserve0Usd + reserve1Usd;
|
||||
if (totalLiquidityUsd <= 0) continue;
|
||||
|
||||
pools.push({
|
||||
chainId,
|
||||
chainName: 'Ethereum Mainnet',
|
||||
poolAddress,
|
||||
dex: 'uniswap_v2',
|
||||
baseSymbol,
|
||||
quoteSymbol,
|
||||
baseAddress,
|
||||
quoteAddress,
|
||||
baseReserveRaw: String(row.baseReserveRaw ?? ''),
|
||||
quoteReserveRaw: String(row.quoteReserveRaw ?? ''),
|
||||
baseReserveUnits: String(baseReserveUnits),
|
||||
quoteReserveUnits: String(quoteReserveUnits),
|
||||
healthy: true,
|
||||
depthOk: true,
|
||||
parityOk: true,
|
||||
reserve0Usd,
|
||||
reserve1Usd,
|
||||
totalLiquidityUsd,
|
||||
sourceArtifact: 'reports/status/mainnet-cwbtc-pools-health-latest.json',
|
||||
});
|
||||
existing.add(poolAddress);
|
||||
}
|
||||
}
|
||||
|
||||
function main(): void {
|
||||
const repoRoot = findRepoRoot();
|
||||
const discoveryPath = path.join(repoRoot, 'reports/extraction/promod-uniswap-v2-live-pair-discovery-latest.json');
|
||||
const deploymentStatusPath = path.join(repoRoot, 'cross-chain-pmm-lps/config/deployment-status.json');
|
||||
const outPath = path.join(process.cwd(), 'config/live-uniswap-v2-pool-catalog.json');
|
||||
|
||||
const discovery = readJson<DiscoveryPayload>(discoveryPath);
|
||||
const deploymentStatus = readJson<DeploymentStatus>(deploymentStatusPath);
|
||||
const pools = [];
|
||||
const pools: Array<Record<string, unknown>> = [];
|
||||
|
||||
for (const entry of discovery.entries ?? []) {
|
||||
const chainId = Number(entry.chain_id);
|
||||
const chain = deploymentStatus.chains?.[String(chainId)];
|
||||
if (!chain) continue;
|
||||
if (fs.existsSync(discoveryPath) && fs.existsSync(deploymentStatusPath)) {
|
||||
const discovery = readJson<DiscoveryPayload>(discoveryPath);
|
||||
const deploymentStatus = readJson<DeploymentStatus>(deploymentStatusPath);
|
||||
|
||||
for (const pair of entry.pairsChecked ?? []) {
|
||||
if (!pair.live || !pair.poolAddress?.startsWith('0x') || !pair.health) continue;
|
||||
const baseAddress = resolveTokenAddress(chain, pair.base);
|
||||
const quoteAddress = resolveTokenAddress(chain, pair.quote);
|
||||
if (!baseAddress || !quoteAddress) continue;
|
||||
for (const entry of discovery.entries ?? []) {
|
||||
const chainId = Number(entry.chain_id);
|
||||
const chain = deploymentStatus.chains?.[String(chainId)];
|
||||
if (!chain) continue;
|
||||
|
||||
const baseReserveUnits = parsePositiveNumber(pair.health.baseReserveUnits);
|
||||
const quoteReserveUnits = parsePositiveNumber(pair.health.quoteReserveUnits);
|
||||
const basePriceUsd = PRICE_USD[pair.base] ?? 0;
|
||||
const quotePriceUsd = PRICE_USD[pair.quote] ?? 0;
|
||||
const reserve0Usd = baseReserveUnits * basePriceUsd;
|
||||
const reserve1Usd = quoteReserveUnits * quotePriceUsd;
|
||||
const totalLiquidityUsd = reserve0Usd + reserve1Usd;
|
||||
if (totalLiquidityUsd <= 0) continue;
|
||||
for (const pair of entry.pairsChecked ?? []) {
|
||||
if (!pair.live || !pair.poolAddress?.startsWith('0x') || !pair.health) continue;
|
||||
const baseAddress = resolveTokenAddress(chain, pair.base);
|
||||
const quoteAddress = resolveTokenAddress(chain, pair.quote);
|
||||
if (!baseAddress || !quoteAddress) continue;
|
||||
|
||||
pools.push({
|
||||
chainId,
|
||||
chainName: entry.network ?? chain.name ?? `Chain ${chainId}`,
|
||||
poolAddress: pair.poolAddress.toLowerCase(),
|
||||
dex: 'uniswap_v2',
|
||||
factoryAddress: entry.factoryAddress,
|
||||
routerAddress: entry.routerAddress,
|
||||
baseSymbol: pair.base,
|
||||
quoteSymbol: pair.quote,
|
||||
baseAddress: baseAddress.toLowerCase(),
|
||||
quoteAddress: quoteAddress.toLowerCase(),
|
||||
baseReserveRaw: pair.health.baseReserveRaw,
|
||||
quoteReserveRaw: pair.health.quoteReserveRaw,
|
||||
baseReserveUnits: pair.health.baseReserveUnits,
|
||||
quoteReserveUnits: pair.health.quoteReserveUnits,
|
||||
priceQuotePerBase: pair.health.priceQuotePerBase,
|
||||
deviationBps: pair.health.deviationBps,
|
||||
depthOk: pair.health.depthOk,
|
||||
parityOk: pair.health.parityOk,
|
||||
healthy: pair.health.healthy,
|
||||
reserve0Usd,
|
||||
reserve1Usd,
|
||||
totalLiquidityUsd,
|
||||
});
|
||||
const baseReserveUnits = parsePositiveNumber(pair.health.baseReserveUnits);
|
||||
const quoteReserveUnits = parsePositiveNumber(pair.health.quoteReserveUnits);
|
||||
const basePriceUsd = PRICE_USD[pair.base] ?? 0;
|
||||
const quotePriceUsd = PRICE_USD[pair.quote] ?? 0;
|
||||
const reserve0Usd = baseReserveUnits * basePriceUsd;
|
||||
const reserve1Usd = quoteReserveUnits * quotePriceUsd;
|
||||
const totalLiquidityUsd = reserve0Usd + reserve1Usd;
|
||||
if (totalLiquidityUsd <= 0) continue;
|
||||
|
||||
pools.push({
|
||||
chainId,
|
||||
chainName: entry.network ?? chain.name ?? `Chain ${chainId}`,
|
||||
poolAddress: pair.poolAddress.toLowerCase(),
|
||||
dex: 'uniswap_v2',
|
||||
factoryAddress: entry.factoryAddress,
|
||||
routerAddress: entry.routerAddress,
|
||||
baseSymbol: pair.base,
|
||||
quoteSymbol: pair.quote,
|
||||
baseAddress: baseAddress.toLowerCase(),
|
||||
quoteAddress: quoteAddress.toLowerCase(),
|
||||
baseReserveRaw: pair.health.baseReserveRaw,
|
||||
quoteReserveRaw: pair.health.quoteReserveRaw,
|
||||
baseReserveUnits: pair.health.baseReserveUnits,
|
||||
quoteReserveUnits: pair.health.quoteReserveUnits,
|
||||
priceQuotePerBase: pair.health.priceQuotePerBase,
|
||||
deviationBps: pair.health.deviationBps,
|
||||
depthOk: pair.health.depthOk,
|
||||
parityOk: pair.health.parityOk,
|
||||
healthy: pair.health.healthy,
|
||||
reserve0Usd,
|
||||
reserve1Usd,
|
||||
totalLiquidityUsd,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pools.sort((a, b) => a.chainId - b.chainId || a.poolAddress.localeCompare(b.poolAddress));
|
||||
mergeCwbtcMeshPools(repoRoot, pools);
|
||||
|
||||
pools.sort(
|
||||
(a, b) =>
|
||||
Number(a.chainId) - Number(b.chainId) ||
|
||||
String(a.poolAddress).localeCompare(String(b.poolAddress))
|
||||
);
|
||||
const payload = {
|
||||
schema: 'token-aggregation-live-uniswap-v2-pool-catalog/v1',
|
||||
generatedAt: new Date().toISOString(),
|
||||
sourceArtifacts: [
|
||||
'reports/extraction/promod-uniswap-v2-live-pair-discovery-latest.json',
|
||||
'cross-chain-pmm-lps/config/deployment-status.json',
|
||||
'reports/status/mainnet-cwbtc-pools-health-latest.json',
|
||||
],
|
||||
poolCount: pools.length,
|
||||
positiveLiquidityPoolCount: pools.filter((pool) => pool.totalLiquidityUsd > 0).length,
|
||||
positiveLiquidityPoolCount: pools.filter((pool) => Number(pool.totalLiquidityUsd) > 0).length,
|
||||
pools,
|
||||
};
|
||||
|
||||
|
||||
@@ -218,4 +218,16 @@ describe('Config API runtime networks loader', () => {
|
||||
)
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it('excludes hub cUSDC/cUSDT peg references from Ethereum mainnet watchAssets', async () => {
|
||||
const metamaskRes = await fetch(`${baseUrl}/api/v1/config/metamask?chainId=1`);
|
||||
expect(metamaskRes.status).toBe(200);
|
||||
const metamaskBody = (await metamaskRes.json()) as Record<string, any>;
|
||||
const symbols = metamaskBody.watchAssets.map((entry: Record<string, any>) => entry.options?.symbol);
|
||||
expect(symbols).not.toContain('cUSDC');
|
||||
expect(symbols).not.toContain('cUSDT');
|
||||
expect(symbols).toEqual(
|
||||
expect.arrayContaining(['cWUSDC', 'cWUSDT'])
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -72,6 +72,19 @@ function resolveWalletWatchAssetSymbol(spec: { symbol: string; familySymbol?: st
|
||||
return spec.symbol;
|
||||
}
|
||||
|
||||
const HUB_COMPLIANT_WATCH_SYMBOLS = new Set(['cUSDC', 'cUSDT']);
|
||||
const HUB_COMPLIANT_WATCH_CHAIN_IDS = new Set([138, 651940]);
|
||||
|
||||
function isWalletWatchAssetEligible(spec: { symbol: string }, chainId: number): boolean {
|
||||
// Off the hub, cUSDC/cUSDT catalog rows point at official USDC/USDT peg contracts
|
||||
// (symbol USDC/USDT on-chain). MetaMask rejects wallet_watchAsset when options.symbol
|
||||
// does not match ERC-20 symbol(). Public wrapped transports are cWUSDC/cWUSDT instead.
|
||||
if (HUB_COMPLIANT_WATCH_SYMBOLS.has(spec.symbol) && !HUB_COMPLIANT_WATCH_CHAIN_IDS.has(chainId)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
type RuntimeNetworksPayload = {
|
||||
version?: string | { major?: number; minor?: number; patch?: number };
|
||||
networks?: unknown[];
|
||||
@@ -219,6 +232,7 @@ router.get(['/config/metamask', '/metamask'], cacheMiddleware(5 * 60 * 1000), as
|
||||
}
|
||||
|
||||
const watchAssets = getCanonicalTokensByChain(chainId)
|
||||
.filter((spec) => isWalletWatchAssetEligible(spec, chainId))
|
||||
.map((spec) => {
|
||||
const address = spec.addresses[chainId];
|
||||
if (!address) return null;
|
||||
|
||||
@@ -120,8 +120,8 @@ describe('canonical cW token catalog', () => {
|
||||
currencyCode: 'BTC',
|
||||
decimals: 8,
|
||||
});
|
||||
expect(cwbtc?.addresses[1]).toBe('0xcb7c000000000000000000000000000000000001');
|
||||
expect(getCanonicalTokenByAddress(1, '0xcb7c000000000000000000000000000000000001')?.symbol).toBe('cWBTC');
|
||||
expect(cwbtc?.addresses[1]).toBe('0x2BBe3c809386FA5349EB2da31E0848ee9f54EE59');
|
||||
expect(getCanonicalTokenByAddress(1, '0x2BBe3c809386FA5349EB2da31E0848ee9f54EE59')?.symbol).toBe('cWBTC');
|
||||
expect(getTokenRegistryFamily(cwbtc!)).toBe('monetary_unit');
|
||||
});
|
||||
|
||||
|
||||
@@ -184,6 +184,7 @@ const FALLBACK_ADDRESSES: Record<string, Partial<Record<number, string>>> = {
|
||||
[CHAIN_138]: '0xc11100000000000000000000000000000000008a',
|
||||
},
|
||||
cWAUSDT: {
|
||||
[1]: '0xe1a51Bc037a79AB36767561B147eb41780124934',
|
||||
[56]: '0xe1a51Bc037a79AB36767561B147eb41780124934',
|
||||
[137]: '0xf12e262F85107df26741726b074606CaFa24AAe7',
|
||||
[42220]: '0xC158b6cD3A3088C52F797D41f5Aa02825361629e',
|
||||
@@ -339,7 +340,7 @@ const FALLBACK_ADDRESSES: Record<string, Partial<Record<number, string>>> = {
|
||||
[43114]: '0xcfdCe5E660FC2C8052BDfa7aEa1865DD753411Ae',
|
||||
},
|
||||
cWBTC: {
|
||||
[1]: '0xcb7c000000000000000000000000000000000001',
|
||||
[1]: '0x2BBe3c809386FA5349EB2da31E0848ee9f54EE59',
|
||||
[10]: '0xcb7c00000000000000000000000000000000000a',
|
||||
[25]: '0xcb7c000000000000000000000000000000000019',
|
||||
[56]: '0xcb7c000000000000000000000000000000000038',
|
||||
|
||||
Reference in New Issue
Block a user