diff --git a/models/silver/defi/lending/aave/silver__aave_repayments.sql b/models/silver/defi/lending/aave/silver__aave_repayments.sql index 977be269..5dff8383 100644 --- a/models/silver/defi/lending/aave/silver__aave_repayments.sql +++ b/models/silver/defi/lending/aave/silver__aave_repayments.sql @@ -28,7 +28,10 @@ WITH repay AS( WHEN contract_address = LOWER('0x794a61358D6845594F94dc1DB02A252b5b4814aD') THEN 'Aave V3' ELSE 'ERROR' END AS aave_version, - origin_to_address AS lending_pool_contract, + COALESCE( + origin_to_address, + contract_address + ) AS lending_pool_contract, origin_from_address AS repayer_address, _log_id, _inserted_timestamp