Skip to content

feat: Gate certain high risk tokens from Singapore custody #6491

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

Merged
merged 1 commit into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions modules/statics/src/coinFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ export const SOL_TOKEN_FEATURES = [
CoinFeature.TSS_COLD,
CoinFeature.BULK_TRANSACTION,
];
export const SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE = SOL_TOKEN_FEATURES.filter(
(feature) => feature !== CoinFeature.CUSTODY_BITGO_SINGAPORE
);
export const SOL_OFC_TOKEN_FEATURES = [...ACCOUNT_COIN_DEFAULT_FEATURES, CoinFeature.TSS, CoinFeature.TSS_COLD];
export const APT_OFC_TOKEN_FEATURES = [...ACCOUNT_COIN_DEFAULT_FEATURES, CoinFeature.TSS, CoinFeature.TSS_COLD];
export const BSC_TOKEN_FEATURES = [...ACCOUNT_COIN_DEFAULT_FEATURES, CoinFeature.BULK_TRANSACTION];
Expand Down
3 changes: 2 additions & 1 deletion modules/statics/src/coins/avaxTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const avaxTokens = [
'Colony Avalanche Index',
18,
'0x48f88a3fe843ccb0b5003e70b4192c1d7448bef0',
UnderlyingAsset['avaxc:cai']
UnderlyingAsset['avaxc:cai'],
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
avaxErc20(
'55d38f23-ed66-43b8-838c-e9df316c0140',
Expand Down
18 changes: 12 additions & 6 deletions modules/statics/src/coins/erc20Coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,8 @@ export const erc20Coins = [
'BCAP',
0,
'0x1f41e42d0a9e3c0dd3ba15b527342783b43200a9',
UnderlyingAsset.BCAP
UnderlyingAsset.BCAP,
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
erc20(
'8f3ba79b-4cf6-417f-a5bc-84c613a3c08e',
Expand Down Expand Up @@ -959,7 +960,8 @@ export const erc20Coins = [
'Bankera',
8,
'0xc80c5e40220172b36adee2c951f26f2a577810c5',
UnderlyingAsset.BNK
UnderlyingAsset.BNK,
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
erc20(
'fd39c546-52c8-4668-b30d-3397681ff9d3',
Expand Down Expand Up @@ -1262,7 +1264,8 @@ export const erc20Coins = [
'Cyber Credit Token',
0,
'0x8469e5158fb3c043cf88ce769c94e4b9fc8d79b5',
UnderlyingAsset.CCT
UnderlyingAsset.CCT,
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
erc20(
'3f222275-9456-4eff-840d-4fe873676619',
Expand Down Expand Up @@ -6261,7 +6264,8 @@ export const erc20Coins = [
'Vinx Coin',
18,
'0x14f0a12a43c36c49d4b403dd6e1a9b8222be456c',
UnderlyingAsset.VXC
UnderlyingAsset.VXC,
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
erc20(
'7733a50f-b06b-4ea2-94bb-d5a6c2999dc2',
Expand Down Expand Up @@ -6605,7 +6609,8 @@ export const erc20Coins = [
'Rialto',
9,
'0xb24754be79281553dc1adc160ddf5cd9b74361a4',
UnderlyingAsset.XRL
UnderlyingAsset.XRL,
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
erc20(
'0ef88852-b8d7-4260-818d-e626c913e56f',
Expand Down Expand Up @@ -10694,7 +10699,8 @@ export const erc20Coins = [
'UBS uMINT',
0,
'0x3797c46db697c24a983222c335f17ba28e8c5b69',
UnderlyingAsset['eth:umint']
UnderlyingAsset['eth:umint'],
AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE
),
erc20(
'627ba0d4-29e6-48ec-b72b-e1124fcc5079',
Expand Down
36 changes: 6 additions & 30 deletions modules/statics/src/coins/solTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ProgramID, solToken, tsolToken } from '../account';
import { CoinFeature, UnderlyingAsset } from '../base';
import {
SOL_TOKEN_FEATURES,
SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE,
SOL_TOKEN_FEATURES_WITH_FRANKFURT,
SOL_TOKEN_FEATURES_WITH_FRANKFURT_GERMANY,
} from '../coinFeatures';
Expand Down Expand Up @@ -2529,12 +2530,7 @@ export const solTokens = [
'USTRYnGgcHAhdWsanv8BG6vHGd4p7UGgoB9NRd8ei7j',
'USTRYnGgcHAhdWsanv8BG6vHGd4p7UGgoB9NRd8ei7j',
UnderlyingAsset['sol:ustry'],
[
...SOL_TOKEN_FEATURES,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
[...SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE, CoinFeature.CUSTODY_BITGO_GERMANY],
ProgramID.Token2022ProgramId
),
solToken(
Expand All @@ -2545,12 +2541,7 @@ export const solTokens = [
'EuroszHk1AL7fHBBsxgeGHsamUqwBpb26oEyt9BcfZ6G',
'EuroszHk1AL7fHBBsxgeGHsamUqwBpb26oEyt9BcfZ6G',
UnderlyingAsset['sol:eurob'],
[
...SOL_TOKEN_FEATURES,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
[...SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE, CoinFeature.CUSTODY_BITGO_GERMANY],
ProgramID.Token2022ProgramId
),
solToken(
Expand All @@ -2561,12 +2552,7 @@ export const solTokens = [
'BRNTNaZeTJANz9PeuD8drNbBHwGgg7ZTjiQYrFgWQ48p',
'BRNTNaZeTJANz9PeuD8drNbBHwGgg7ZTjiQYrFgWQ48p',
UnderlyingAsset['sol:tesouro'],
[
...SOL_TOKEN_FEATURES,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
[...SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE, CoinFeature.CUSTODY_BITGO_GERMANY],
ProgramID.Token2022ProgramId
),
solToken(
Expand All @@ -2577,12 +2563,7 @@ export const solTokens = [
'CETES7CKqqKQizuSN6iWQwmTeFRjbJR6Vw2XRKfEDR8f',
'CETES7CKqqKQizuSN6iWQwmTeFRjbJR6Vw2XRKfEDR8f',
UnderlyingAsset['sol:cetes'],
[
...SOL_TOKEN_FEATURES,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
[...SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE, CoinFeature.CUSTODY_BITGO_GERMANY],
ProgramID.Token2022ProgramId
),
solToken(
Expand All @@ -2593,12 +2574,7 @@ export const solTokens = [
'GiLTSeSFnNse7xQVYeKdMyckGw66AoRmyggGg1NNd4yr',
'GiLTSeSFnNse7xQVYeKdMyckGw66AoRmyggGg1NNd4yr',
UnderlyingAsset['sol:gilts'],
[
...SOL_TOKEN_FEATURES,
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
[...SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE, CoinFeature.CUSTODY_BITGO_GERMANY],
ProgramID.Token2022ProgramId
),
solToken(
Expand Down
30 changes: 5 additions & 25 deletions modules/statics/test/unit/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,39 +300,19 @@ const custodyFeatures: Record<string, { features: CoinFeature[] }> = {
],
},
'sol:ustry': {
features: [
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
features: [CoinFeature.CUSTODY_BITGO_FRANKFURT, CoinFeature.CUSTODY_BITGO_GERMANY],
},
'sol:eurob': {
features: [
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
features: [CoinFeature.CUSTODY_BITGO_FRANKFURT, CoinFeature.CUSTODY_BITGO_GERMANY],
},
'sol:tesouro': {
features: [
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
features: [CoinFeature.CUSTODY_BITGO_FRANKFURT, CoinFeature.CUSTODY_BITGO_GERMANY],
},
'sol:cetes': {
features: [
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
features: [CoinFeature.CUSTODY_BITGO_FRANKFURT, CoinFeature.CUSTODY_BITGO_GERMANY],
},
'sol:gilts': {
features: [
CoinFeature.CUSTODY_BITGO_FRANKFURT,
CoinFeature.CUSTODY_BITGO_GERMANY,
CoinFeature.CUSTODY_BITGO_SINGAPORE,
],
features: [CoinFeature.CUSTODY_BITGO_FRANKFURT, CoinFeature.CUSTODY_BITGO_GERMANY],
},
'sol:muskit': {
features: [
Expand Down
Loading