diff --git a/distance-oracle/src/api.rs b/distance-oracle/src/api.rs
index 0ddcaba1de7e3d6f134ed66d0e8a952a89440024..14e67b710fde98fe3a6deea9cd9b510730573b3f 100644
--- a/distance-oracle/src/api.rs
+++ b/distance-oracle/src/api.rs
@@ -81,6 +81,13 @@ pub async fn evaluation_block(client: &Client, parent_hash: H256) -> H256 {
         .expect("No evaluation block")
 }
 
+pub async fn max_referee_distance(client: &Client) -> u32 {
+    client
+        .constants()
+        .at(&runtime::constants().distance().max_referee_distance())
+        .expect("Cannot fetch referee distance")
+}
+
 pub async fn member_iter(client: &Client, evaluation_block: H256) -> MemberIter {
     MemberIter(
         client
diff --git a/distance-oracle/src/lib.rs b/distance-oracle/src/lib.rs
index bc8c432ba2f7d9c8cc5b9f21385934ee01e204f7..daff57e9035b43ec8337bd02e4f3537d4a5579f1 100644
--- a/distance-oracle/src/lib.rs
+++ b/distance-oracle/src/lib.rs
@@ -72,7 +72,6 @@ impl From<u64> for Tip {
 
 pub struct Settings {
     pub evaluation_result_dir: PathBuf,
-    pub max_depth: u32,
     pub rpc_url: String,
 }
 
@@ -80,7 +79,6 @@ impl Default for Settings {
     fn default() -> Self {
         Self {
             evaluation_result_dir: PathBuf::from("/tmp/duniter/chains/gdev/distance"),
-            max_depth: 5,
             rpc_url: String::from("ws://127.0.0.1:9944"),
         }
     }
@@ -151,6 +149,8 @@ pub async fn run(
 ) -> Option<(Vec<sp_runtime::Perbill>, u32, PathBuf)> {
     let parent_hash = api::parent_hash(client).await;
 
+    let max_depth = api::max_referee_distance(client).await;
+
     let current_session = api::current_session(client, parent_hash).await;
 
     // Fetch the pending identities
@@ -196,9 +196,7 @@ pub async fn run(
         members.insert(member_idty, 0);
     }
 
-    let min_certs_for_referee = (members.len() as f32)
-        .powf(1. / (settings.max_depth as f32))
-        .ceil() as u32;
+    let min_certs_for_referee = (members.len() as f32).powf(1. / (max_depth as f32)).ceil() as u32;
 
     // idty -> received certs
     let mut received_certs = FnvHashMap::<IdtyIndex, Vec<IdtyIndex>>::default();
@@ -236,7 +234,7 @@ pub async fn run(
         .0
         .as_slice()
         .par_iter()
-        .map(|(idty, _)| distance_rule(&received_certs, &referees, settings.max_depth, *idty))
+        .map(|(idty, _)| distance_rule(&received_certs, &referees, max_depth, *idty))
         .collect();
 
     Some((evaluation, current_session, evaluation_result_path))
diff --git a/distance-oracle/src/main.rs b/distance-oracle/src/main.rs
index d60668e87fa145b1da53fcf60d5f38a007eaf8cd..9e3644a8b341397e96043162027a41677b534a59 100644
--- a/distance-oracle/src/main.rs
+++ b/distance-oracle/src/main.rs
@@ -20,9 +20,6 @@ use clap::Parser;
 struct Cli {
     #[clap(short = 'd', long, default_value = "/tmp/duniter/chains/gdev/distance")]
     evaluation_result_dir: String,
-    /// Maximum depth to explore the WoT graph for referees
-    #[clap(short = 'D', long, default_value = "5")]
-    max_depth: u32,
     #[clap(short = 'u', long, default_value = "ws://127.0.0.1:9944")]
     rpc_url: String,
     /// Log level (off, error, warn, info, debug, trace)
@@ -43,7 +40,6 @@ async fn main() {
         &distance_oracle::api::client(cli.rpc_url.clone()).await,
         distance_oracle::Settings {
             evaluation_result_dir: cli.evaluation_result_dir.into(),
-            max_depth: cli.max_depth,
             rpc_url: cli.rpc_url,
         },
     )
diff --git a/distance-oracle/src/mock.rs b/distance-oracle/src/mock.rs
index 1ecc7a74c2d91fc36d3b0887c5e47081ffe2e881..805ac607bc72e49d9824dd9dbc510f4f820b71d3 100644
--- a/distance-oracle/src/mock.rs
+++ b/distance-oracle/src/mock.rs
@@ -76,6 +76,10 @@ pub async fn evaluation_block(_client: &Client, _parent_hash: H256) -> H256 {
     Default::default()
 }
 
+pub async fn max_referee_distance(_client: &Client) -> u32 {
+    5
+}
+
 pub async fn member_iter(client: &Client, _evaluation_block: H256) -> MemberIter {
     MemberIter(client.wot.get_enabled().into_iter())
 }
diff --git a/distance-oracle/src/tests.rs b/distance-oracle/src/tests.rs
index f2f6d77ed3ac38172f6f41efa3a4fc9042c3f580..a1c197fa82121eb99b9e16293e85368a916404d4 100644
--- a/distance-oracle/src/tests.rs
+++ b/distance-oracle/src/tests.rs
@@ -26,7 +26,6 @@ use std::{fs::File, io::Read};
 async fn test_distance_against_v1() {
     let wot = wot_from_v1_file();
     let n = wot.size();
-    let max_depth = 5;
     let min_certs_for_referee = (wot.get_enabled().len() as f32).powf(1. / 5.).ceil() as u32;
 
     // Reference implementation
@@ -44,7 +43,7 @@ async fn test_distance_against_v1() {
                     dubp_wot::operations::distance::WotDistanceParameters {
                         node: i,
                         sentry_requirement: min_certs_for_referee,
-                        step_max: max_depth,
+                        step_max: 5,
                         x_percent: 0.8,
                     },
                 )
@@ -59,16 +58,9 @@ async fn test_distance_against_v1() {
     client.pool_len = n;
 
     let t_a = std::time::Instant::now();
-    let results = crate::run(
-        &client,
-        &crate::Settings {
-            max_depth,
-            ..Default::default()
-        },
-        false,
-    )
-    .await
-    .unwrap();
+    let results = crate::run(&client, &Default::default(), false)
+        .await
+        .unwrap();
     println!("new time: {}", t_a.elapsed().as_millis());
     assert_eq!(results.0.len(), n);
 
diff --git a/docs/user/distance.md b/docs/user/distance.md
index 3dea9edf231cca1e0c0722fe6a7176ecadcd9d85..1f578f2501531770879b4d2023f803eb29d49b4a 100644
--- a/docs/user/distance.md
+++ b/docs/user/distance.md
@@ -10,15 +10,9 @@ Any smith member authoring blocks can run a distance evaluation oracle. It is be
 
 The simplest way is to run the oracle on the same machine as Duniter.
 
-Build the oracle:
-
-    cargo build --release -p distance-oracle
-
-It will be available at `./target/release/distance-oracle`. Move it to somewhere appropriate.
-
 Add this line to your cron with the command `crontab -e`: (add option `-u <user>` to edit another user's cron)
 
-    4,24,44 * * * * nice -n 2 /absolute/path/to/distance-oracle
+    4,24,44 * * * * nice -n 2 /absolute/path/to/duniter distance-oracle
 
 The precise hours don't matter so you can pick random values, but it should run at least one time per hour, and running it more often decreases the risk of problem in case of missing blocks or temporary network failure.
 
@@ -28,4 +22,4 @@ The `nice -n 2` lowers the oracle's priority, so that Duniter has the priority e
 
 ### Additional Duniter configuration
 
-Duniter should keep states at least one session old, that it 600 blocks (while 256 is the default). Use the option `--state-pruning 600` if your node is not already an archive (`--state-pruning archive`).
+Duniter should keep states at least one session old, that is 600 blocks (while 256 is the default). Use the option `--state-pruning 600` if your node is not already an archive (`--state-pruning archive`).
diff --git a/end2end-tests/tests/common/distance.rs b/end2end-tests/tests/common/distance.rs
index e7ff6d6d4542b706bfc1f21b9016587de342adbf..c06b52919fb2dc09b0011088dfb229e28295f7e4 100644
--- a/end2end-tests/tests/common/distance.rs
+++ b/end2end-tests/tests/common/distance.rs
@@ -49,7 +49,6 @@ pub async fn run_oracle(client: &Client, origin: AccountKeyring, rpc_url: String
         &distance_oracle::api::client(rpc_url.clone()).await,
         &distance_oracle::Settings {
             evaluation_result_dir: PathBuf::default(),
-            max_depth: 5,
             rpc_url,
         },
         false,
diff --git a/node/src/cli.rs b/node/src/cli.rs
index a6f6a25e920082ec70fa50e81cb0cd79f8bf4cf6..effac655de2fd519c2a098967d56a53128fcc601 100644
--- a/node/src/cli.rs
+++ b/node/src/cli.rs
@@ -141,9 +141,6 @@ pub struct Completion {
 pub struct DistanceOracle {
     #[clap(short = 'd', long, default_value = "/tmp/duniter/chains/gdev/distance")]
     pub evaluation_result_dir: String,
-    /// Maximum depth to explore the WoT graph for referees
-    #[clap(short = 'D', long, default_value = "5")]
-    pub max_depth: u32,
     #[clap(short = 'u', long, default_value = "ws://127.0.0.1:9944")]
     pub rpc_url: String,
 }
diff --git a/node/src/command.rs b/node/src/command.rs
index 60aa193aa645c24c30d74fed474921bab1c5d256..e120906e76e6da2b105adf570a22825c896f9542 100644
--- a/node/src/command.rs
+++ b/node/src/command.rs
@@ -310,7 +310,6 @@ pub fn run() -> sc_cli::Result<()> {
                 &distance_oracle::api::client(cmd.rpc_url.clone()).await,
                 distance_oracle::Settings {
                     evaluation_result_dir: cmd.evaluation_result_dir.clone().into(),
-                    max_depth: cmd.max_depth,
                     rpc_url: cmd.rpc_url.clone(),
                 },
             )
diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs
index 0a13a751c08fc503f07c50da2dca6b399582f4f9..d7d131cd8f00e99d7bcef9b4470ae512a1caa07e 100644
--- a/pallets/distance/src/lib.rs
+++ b/pallets/distance/src/lib.rs
@@ -72,6 +72,10 @@ pub mod pallet {
         type EvaluationPrice: Get<
             <Self::Currency as frame_support::traits::Currency<Self::AccountId>>::Balance,
         >;
+        /// Maximum distance used to define referee's accessibility
+        /// Unused by runtime but needed by client distance oracle
+        #[pallet::constant]
+        type MaxRefereeDistance: Get<u32>;
         /// Minimum ratio of accessible referees
         #[pallet::constant]
         type MinAccessibleReferees: Get<Perbill>;
diff --git a/pallets/distance/src/mock.rs b/pallets/distance/src/mock.rs
index a05d58577b4ff3e72e8cfa9f150222e6518793cc..bcdbd095db31767691af200b13e0358a73ef8b2c 100644
--- a/pallets/distance/src/mock.rs
+++ b/pallets/distance/src/mock.rs
@@ -253,6 +253,7 @@ parameter_types! {
 impl pallet_distance::Config for Test {
     type Currency = Balances;
     type EvaluationPrice = frame_support::traits::ConstU64<1000>;
+    type MaxRefereeDistance = frame_support::traits::ConstU32<5>;
     type MinAccessibleReferees = MinAccessibleReferees;
     type ResultExpiration = frame_support::traits::ConstU32<720>;
     type RuntimeEvent = RuntimeEvent;
diff --git a/resources/metadata.scale b/resources/metadata.scale
index 7f579695264b0823a205907a6cfb8014e4f750cd..86dc5fa76adcc7628a8dd62903866e06603f0719 100644
Binary files a/resources/metadata.scale and b/resources/metadata.scale differ
diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs
index a9eedceef109638c2d9ec9ecb73807990abcd15e..e61c1996d27c25bf6d78855917b6e09e5b954944 100644
--- a/runtime/common/src/pallets_config.rs
+++ b/runtime/common/src/pallets_config.rs
@@ -518,6 +518,7 @@ macro_rules! pallets_config {
         impl pallet_distance::Config for Runtime {
             type Currency = Balances;
             type EvaluationPrice = frame_support::traits::ConstU64<1000>;
+            type MaxRefereeDistance = frame_support::traits::ConstU32<5>;
             type MinAccessibleReferees = MinAccessibleReferees;
             type ResultExpiration = frame_support::traits::ConstU32<720>;
             type RuntimeEvent = RuntimeEvent;