Repository: interlay/interbtc (language: rust)

Issue:
OnExchangeRateChange hook missing
This should have the poolmanager update hook - without it, stakes will not be correct. It is set in the testnet config but not on mainnet.

https://github.com/interlay/interbtc/blob/04ba53328c1ab537ad9f09a5c05764c6736c79a9/parachain/runtime/kintsugi/src/lib.rs#L1080

Also for Interlay network. This should definitely be fixed before launching on mainnet. I want to look into moving more runtime setup code to the common crate to prevent cases like this (which is why I'm opening an issue rather than quickly fixing in a pr)


Discussion / hints:

Fix patch:
diff --git a/parachain/runtime/interlay/src/lib.rs b/parachain/runtime/interlay/src/lib.rs
index 682b20644e..401fc30327 100644
--- a/parachain/runtime/interlay/src/lib.rs
+++ b/parachain/runtime/interlay/src/lib.rs
@@ -1078,7 +1078,7 @@ where
 
 impl oracle::Config for Runtime {
     type RuntimeEvent = RuntimeEvent;
-    type OnExchangeRateChange = ();
+    type OnExchangeRateChange = vault_registry::PoolManager<Runtime>;
     type WeightInfo = ();
 }
 
diff --git a/parachain/runtime/kintsugi/src/lib.rs b/parachain/runtime/kintsugi/src/lib.rs
index 1d845eab0e..6d9f639cbc 100644
--- a/parachain/runtime/kintsugi/src/lib.rs
+++ b/parachain/runtime/kintsugi/src/lib.rs
@@ -1076,7 +1076,7 @@ where
 
 impl oracle::Config for Runtime {
     type RuntimeEvent = RuntimeEvent;
-    type OnExchangeRateChange = ();
+    type OnExchangeRateChange = vault_registry::PoolManager<Runtime>;
     type WeightInfo = ();
 }
 


Test patch: