From 8e5f72881b5358b009aaffe0d575d6bf5c0552f4 Mon Sep 17 00:00:00 2001 From: rndquu Date: Wed, 24 Jan 2024 12:13:22 +0300 Subject: [PATCH] fix: remove balanced reserves check --- packages/contracts/src/dollar/libraries/LibTWAPOracle.sol | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/contracts/src/dollar/libraries/LibTWAPOracle.sol b/packages/contracts/src/dollar/libraries/LibTWAPOracle.sol index 03b642b22..196ee0702 100644 --- a/packages/contracts/src/dollar/libraries/LibTWAPOracle.sol +++ b/packages/contracts/src/dollar/libraries/LibTWAPOracle.sol @@ -47,8 +47,7 @@ library LibTWAPOracle { // ensure that there's liquidity in the pair require(_reserve0 != 0 && _reserve1 != 0, "TWAPOracle: NO_RESERVES"); - // ensure that pair balance is perfect - require(_reserve0 == _reserve1, "TWAPOracle: PAIR_UNBALANCED"); + ts.priceCumulativeLast = IMetaPool(_pool).get_price_cumulative_last(); ts.pricesBlockTimestampLast = IMetaPool(_pool).block_timestamp_last(); ts.pool = _pool;