Query editor
-- Liquity V2: does the Autonomous Interest Rate Manager hold its own debt-in-front band?---- The ARM (github.com/liquity/bold-ir-management) targets a debt-in-front for its-- delegators equal to target_percentage of maximum_redeemable_against_collateral,-- and only acts when the measured value leaves [0.85x, 1.15x] of that target.-- Source: ir_manager/src/strategy/executable.rs, constants.rs.---- maximum_redeemable_against_collateral_i-- = entire_system_debt / 100 if unbacked_i*100/total_unbacked < 1-- = unbacked_i * entire_system_debt / total_unbacked otherwise-- unbacked_i = max(0, branchDebt_i - stabilityPoolBoldDeposits_i)-- (TroveManager.getUnbackedPortionPriceAndRedeemability)-- entire_system_debt = sum of branchDebt over all three branches-- total_unbacked = sum of unbacked_i over all redeemable branches-- target_percentage = target_min * 2f / (f + 0.005), f = getRedemptionRateWithDecay-- = target_min exactly when baseRate = 0---- baseRate decays by REDEMPTION_MINUTE_DECAY_FACTOR = 0.9980764... per minute,-- a six hour half life, so on a daily snapshot f sits at the 0.5% floor unless a-- redemption happened within hours of the snapshot. target_min is a canister init-- argument, not readable from Ethereum; the published default is 50%, which gives-- the [42.5%, 57.5%] band tested here.---- Measured branch: wstETH. Measured batch: 0x8869a6fb59a8df330f90d9fbf46ebfaff6d4bc14.WITH days AS (SELECT d FROM UNNEST(SEQUENCE(DATE '2025-05-19', CURRENT_DATE, INTERVAL '1' DAY)) AS t(d)),tro AS (SELECT 'WETH' AS branch, CAST(_troveId AS varchar) AS trove_id, CAST(_operation AS integer) AS op,evt_block_time AS bt, CAST(evt_index AS bigint) AS eiFROM liquity_v2_ethereum.trovemanager_weth_evt_troveoperation WHERE evt_block_date >= DATE '2025-01-01'UNION ALLSELECT 'wstETH', CAST(_troveId AS varchar), CAST(_operation AS integer), evt_block_time, CAST(evt_index AS bigint)FROM liquity_v2_ethereum.trovemanager_wsteth_evt_troveoperation WHERE evt_block_date >= DATE '2025-01-01'UNION ALLSELECT 'rETH', CAST(_troveId AS varchar), CAST(_operation AS integer), evt_block_time, CAST(evt_index AS bigint)FROM liquity_v2_ethereum.trovemanager_reth_evt_troveoperation WHERE evt_block_date >= DATE '2025-01-01'),mem_day AS (SELECT branch, trove_id, day, op FROM (SELECT branch, trove_id, CAST(bt AS date) AS day, op,ROW_NUMBER() OVER (PARTITION BY branch, trove_id, CAST(bt AS date) ORDER BY bt DESC, ei DESC) AS rnFROM tro WHERE op IN (0, 1, 5, 7, 8, 9)) x WHERE rn = 1),mem_span AS (SELECT branch, trove_id, day, op,COALESCE(LEAD(day) OVER (PARTITION BY branch, trove_id ORDER BY day), DATE '2099-01-01') AS ndayFROM mem_day),mem_state AS (SELECT d.d AS day, s.branch, s.trove_id, s.opFROM mem_span s JOIN days d ON d.d >= s.day AND d.d < s.nday),pl AS (SELECT 'WETH' AS branch, CAST(_troveId AS varchar) AS trove_id, CAST(_debt AS double)/1e18 AS debt,CAST(_annualInterestRate AS double)/1e16 AS rate, evt_block_time AS bt, CAST(evt_index AS bigint) AS eiFROM liquity_v2_ethereum.trovemanager_weth_evt_troveupdated WHERE evt_block_date >= DATE '2025-01-01'UNION ALLSELECT 'wstETH', CAST(_troveId AS varchar), CAST(_debt AS double)/1e18,