From a2122b9aac1b60cb2c3597bdd71303cb6e00826d Mon Sep 17 00:00:00 2001 From: MetalDev Date: Wed, 11 Feb 2026 15:44:36 +0000 Subject: [PATCH] feat: add Solder Cortex conviction scoring integration Adds conviction scoring for trading decisions: - getWalletConviction(wallet) - fetch cross-domain conviction score - shouldFollowTrade(wallet, minConviction) - decision helper High conviction = wallet active in both DeFi and prediction markets. Demo: http://76.13.193.103/ Colosseum: Solder Cortex project --- integrations/solder-cortex.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 integrations/solder-cortex.js diff --git a/integrations/solder-cortex.js b/integrations/solder-cortex.js new file mode 100644 index 0000000..2869a68 --- /dev/null +++ b/integrations/solder-cortex.js @@ -0,0 +1,32 @@ +/** + * Solder Cortex Integration for SIDEX + * Conviction scoring for trading decisions. + * + * Before executing trades, check wallet conviction across DeFi + prediction markets. + * High conviction = trader has real skin in the game. + * + * Demo: http://76.13.193.103/ + * GitHub: https://github.com/metalmcclaw/solder-cortex + */ + +const CORTEX_API = process.env.CORTEX_API_URL || 'http://76.13.193.103/api'; + +async function getWalletConviction(wallet) { + try { + const res = await fetch(`${CORTEX_API}/conviction/${wallet}`); + return res.ok ? await res.json() : null; + } catch (e) { + console.error('Cortex error:', e.message); + return null; + } +} + +async function shouldFollowTrade(wallet, minConviction = 0.7) { + const c = await getWalletConviction(wallet); + if (!c) return { follow: false, reason: 'Could not fetch conviction' }; + return c.score >= minConviction + ? { follow: true, reason: `High conviction (${c.score.toFixed(2)})`, conviction: c } + : { follow: false, reason: `Low conviction (${c.score.toFixed(2)})`, conviction: c }; +} + +module.exports = { getWalletConviction, shouldFollowTrade, CORTEX_API };