NonFungibleTime
NonFungibleTime copied to clipboard
Add TRM Labs
What we did at aave(before we moved to ipfs) was a little overkill i guess as you only need to check an api: https://gitlab.com/aave-tech/aave-protocol-v2/aave-api/-/merge_requests/121/diffs#cfc52d8c1aa3a8090df907edcef08d50e385637d_58_56 this was the pr for when i removed it - not sure if that's any help as it's embeded in pretty convoluted code.
Essentially how it works:
you do a call to the trm api https://gitlab.com/aave-tech/aave-protocol-v2/aave-api/-/merge_requests/121/diffs#ce4c406461c08272bb32bd2f12ac68ec5ffbef85_101_0 with an address which will return this type of response
export type TRMScreeningType = {
address: string; // '149w62rY42aZBox8fGcmqNsXUzSStKeq8C';
blockchain: string; // 'bitcoin';
asset: string; // 'BTC';
riskScore: string; // 'HIGH';
riskIndicators: RiskIndicatorType[];
entities: TRMEntityType[];
};
on aave-ui we only checked the "riskScore" which contains values from LOW to SEVERE. When the riskScore was SEVERE we blocked the ui.
as this api wasn't very quick we added a caching on top to only check an address every 24h or so