diff --git a/common/configuration.ts b/common/configuration.ts index defd0b5841..2717af96b8 100644 --- a/common/configuration.ts +++ b/common/configuration.ts @@ -119,6 +119,10 @@ export interface ITokens { USDM?: string wUSDM?: string + // Sky + USDS?: string + sUSDS?: string + // Aerodrome AERO?: string } @@ -265,6 +269,8 @@ export const networkConfig: { [key: string]: INetworkConfig } = { sdUSDCUSDCPlus: '0x9bbF31E99F30c38a5003952206C31EEa77540BeF', USDe: '0x4c9edd5852cd905f086c759e8383e09bff1e68b3', sUSDe: '0x9D39A5DE30e57443BfF2A8307A4256c8797A3497', + USDS: '0xdC035D45d973E3EC169d2276DDab16f1e407384F', + sUSDS: '0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD', }, chainlinkFeeds: { RSR: '0x759bBC1be8F90eE6457C44abc7d443842a976d02', @@ -294,6 +300,7 @@ export const networkConfig: { [key: string]: INetworkConfig } = { pyUSD: '0x8f1dF6D7F2db73eECE86a18b4381F4707b918FB1', apxETH: '0x19219BC90F48DeE4d5cF202E09c438FAacFd8Bea', // apxETH/ETH USDe: '0xa569d910839Ae8865Da8F8e70FfFb0cBA869F961', + USDS: '0xfF30586cD0F29eD462364C7e81375FC0C71219b1', }, AAVE_INCENTIVES: '0xd784927Ff2f95ba542BfC824c8a8a98F3495f6b5', AAVE_EMISSIONS_MGR: '0xEE56e2B3D491590B5b31738cC34d5232F378a8D5', diff --git a/contracts/plugins/assets/sky/README.md b/contracts/plugins/assets/sky/README.md new file mode 100644 index 0000000000..39701370c5 --- /dev/null +++ b/contracts/plugins/assets/sky/README.md @@ -0,0 +1,28 @@ +# SUSDS SSR Collateral Plugin + +## Summary + +This plugin allows `sUSDS` (Sky) holders to use their tokens as collateral in the Reserve Protocol. + +`sUSDS` token represents a tokenized implementation of the Sky Savings Rate for `USDS`, fully compliant with the ERC-4626 standard. It enables real-time share-to-asset conversions, ensuring accurate values even if the system's drip function hasn't been called recently. + +These `sUSDS` tokens serve as a digital record of any value accrued to a specific position. The Sky Protocol dynamically and automatically adds USDS tokens to the entire pool of USDS supplied to the module every few seconds, in accordance with the Sky Savings Rate. As a result of the tokens auto-accumulating in the pool over time, the value tends to accrue within the sUSDS being held. + +Since it is ERC4626, the redeemable USDS amount can be gotten by dividing `sUSDS.totalAssets()` by `sUSDS.totalSupply()`. +`sUSDS` contract: + +Sky Money: https://sky.money/ + +## Implementation + +### Units + +| tok | ref | target | UoA | +| ----- | ---- | ------ | --- | +| sUSDS | USDS | USD | USD | + +### Functions + +#### refPerTok {ref/tok} + +`return shiftl_toFix(IERC4626(address(erc20)).convertToAssets(oneShare), -refDecimals, FLOOR);` diff --git a/contracts/plugins/assets/sky/SUSDSCollateral.sol b/contracts/plugins/assets/sky/SUSDSCollateral.sol new file mode 100644 index 0000000000..926af4bfd6 --- /dev/null +++ b/contracts/plugins/assets/sky/SUSDSCollateral.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: BlueOak-1.0.0 +pragma solidity 0.8.19; + +import "../ERC4626FiatCollateral.sol"; + +/** + * @title SUSDS Collateral + * @notice Collateral plugin for the SSR wrapper sUSDS + * tok = SUSDS (transferrable SSR-locked USDS) + * ref = USDS + * tar = USD + * UoA = USD + */ +contract SUSDSCollateral is ERC4626FiatCollateral { + /// @param config.chainlinkFeed {UoA/ref} price of USDS in USD terms + constructor(CollateralConfig memory config, uint192 revenueHiding) + ERC4626FiatCollateral(config, revenueHiding) + { + require(config.defaultThreshold != 0, "defaultThreshold zero"); + } +} diff --git a/contracts/plugins/assets/sky/vendor/ISUsds.sol b/contracts/plugins/assets/sky/vendor/ISUsds.sol new file mode 100644 index 0000000000..43e1868d6c --- /dev/null +++ b/contracts/plugins/assets/sky/vendor/ISUsds.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: BlueOak-1.0.0 +pragma solidity 0.8.19; + +interface ISUsds { + function vow() external view returns (address); + + function usdsJoin() external view returns (address); + + function usds() external view returns (address); + + function ssr() external view returns (uint256); + + function chi() external view returns (uint192); + + function rho() external view returns (uint64); + + function drip() external returns (uint256); +} diff --git a/contracts/plugins/assets/sky/vendor/SUsdcMock.sol b/contracts/plugins/assets/sky/vendor/SUsdcMock.sol new file mode 100644 index 0000000000..695acaccd6 --- /dev/null +++ b/contracts/plugins/assets/sky/vendor/SUsdcMock.sol @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: BlueOak-1.0.0 +pragma solidity 0.8.19; + +interface VatLike { + function hope(address) external; + + function suck( + address, + address, + uint256 + ) external; +} + +interface UsdsJoinLike { + function vat() external view returns (address); + + function usds() external view returns (address); + + function exit(address, uint256) external; +} + +interface UsdsLike { + function transfer(address, uint256) external; + + function transferFrom( + address, + address, + uint256 + ) external; +} + +contract SUsdsMock { + // --- Storage Variables --- + + // Admin + mapping(address => uint256) public wards; + // ERC20 + uint256 public totalSupply; + mapping(address => uint256) public balanceOf; + mapping(address => mapping(address => uint256)) public allowance; + mapping(address => uint256) public nonces; + // Savings yield + uint192 public chi; // The Rate Accumulator [ray] + uint64 public rho; // Time of last drip [unix epoch time] + uint256 public ssr; // The USDS Savings Rate [ray] + + // --- Constants --- + + // ERC20 + string public constant name = "Savings USDS"; + string public constant symbol = "sUSDS"; + string public constant version = "1"; + uint8 public constant decimals = 18; + // Math + uint256 private constant RAY = 10**27; + + // --- Immutables --- + + // EIP712 + bytes32 public constant PERMIT_TYPEHASH = + keccak256( + "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" + ); + // Savings yield + UsdsJoinLike public immutable usdsJoin; + VatLike public immutable vat; + UsdsLike public immutable usds; + address public immutable vow; + + constructor(address usdsJoin_, address vow_) { + usdsJoin = UsdsJoinLike(usdsJoin_); + vat = VatLike(UsdsJoinLike(usdsJoin_).vat()); + usds = UsdsLike(UsdsJoinLike(usdsJoin_).usds()); + vow = vow_; + + chi = uint192(RAY); + rho = uint64(block.timestamp); + ssr = RAY; + vat.hope(address(usdsJoin)); + wards[msg.sender] = 1; + } + + // Mock function to be able to override chi in tests + function setChi(uint192 newValue) external { + chi = newValue; + } +} diff --git a/scripts/addresses/1-tmp-assets-collateral.json b/scripts/addresses/1-tmp-assets-collateral.json index 377f312a06..c6eedc3e28 100644 --- a/scripts/addresses/1-tmp-assets-collateral.json +++ b/scripts/addresses/1-tmp-assets-collateral.json @@ -63,7 +63,8 @@ "apxETH": "0x05ffDaAA2aF48e1De1CE34d633db018a28e3B3F5", "sUSDe": "0x35081Ca24319835e5f759163F7e75eaB753e0b7E", "pyUSD": "0xa5cde4fB1132daF8f4a0D3140859271208d944E9", - "cUSDTv3": "0x1B2256a88Bb9F2E54cC8D355D3161a2F069a320B" + "cUSDTv3": "0x1B2256a88Bb9F2E54cC8D355D3161a2F069a320B", + "sUSDS": "0xaFf578165bEA370D16d8AC61A4C8c6D435785d58" }, "erc20s": { "stkAAVE": "0x4da27a545c0c5B758a6BA100e3a049001de870f5", @@ -127,6 +128,7 @@ "apxETH": "0x9Ba021B0a9b958B5E75cE9f6dff97C7eE52cb3E6", "sUSDe": "0x9D39A5DE30e57443BfF2A8307A4256c8797A3497", "pyUSD": "0x6c3ea9036406852006290770bedfcaba0e23a0e8", - "cUSDTv3": "0xEB74EC1d4C1DAB412D5d6674F6833FD19d3118Ce" + "cUSDTv3": "0xEB74EC1d4C1DAB412D5d6674F6833FD19d3118Ce", + "sUSDS": "0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD" } } \ No newline at end of file diff --git a/scripts/addresses/mainnet-4.0.0/1-tmp-assets-collateral.json b/scripts/addresses/mainnet-4.0.0/1-tmp-assets-collateral.json index de160977da..4691ca0a59 100644 --- a/scripts/addresses/mainnet-4.0.0/1-tmp-assets-collateral.json +++ b/scripts/addresses/mainnet-4.0.0/1-tmp-assets-collateral.json @@ -2,10 +2,12 @@ "assets": {}, "collateral": { "ETHx": "0x73a36258E6A48D0095D1997Fec7F51e191B4Ec81", - "cUSDTv3": "0x1B2256a88Bb9F2E54cC8D355D3161a2F069a320B" + "cUSDTv3": "0x1B2256a88Bb9F2E54cC8D355D3161a2F069a320B", + "sUSDS": "0xaFf578165bEA370D16d8AC61A4C8c6D435785d58" }, "erc20s": { "ETHx": "0xA35b1B31Ce002FBF2058D22F30f95D405200A15b", - "cUSDTv3": "0xEB74EC1d4C1DAB412D5d6674F6833FD19d3118Ce" + "cUSDTv3": "0xEB74EC1d4C1DAB412D5d6674F6833FD19d3118Ce", + "sUSDS": "0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD" } } diff --git a/scripts/deploy.ts b/scripts/deploy.ts index a65a611055..0b37d28e3f 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -96,7 +96,8 @@ async function main() { 'phase2-assets/collaterals/deploy_USDe.ts', 'phase2-assets/assets/deploy_crv.ts', 'phase2-assets/assets/deploy_cvx.ts', - 'phase2-assets/collaterals/deploy_pyusd.ts' + 'phase2-assets/collaterals/deploy_pyusd.ts', + 'phase2-assets/collaterals/deploy_sky_susds.ts' ) } else if (chainId == '8453' || chainId == '84531') { // Base L2 chains diff --git a/scripts/deployment/phase2-assets/collaterals/deploy_sky_susds.ts b/scripts/deployment/phase2-assets/collaterals/deploy_sky_susds.ts new file mode 100644 index 0000000000..0e2699ecc8 --- /dev/null +++ b/scripts/deployment/phase2-assets/collaterals/deploy_sky_susds.ts @@ -0,0 +1,85 @@ +import fs from 'fs' +import hre from 'hardhat' +import { getChainId } from '../../../../common/blockchain-utils' +import { networkConfig } from '../../../../common/configuration' +import { bn, fp } from '../../../../common/numbers' +import { expect } from 'chai' +import { CollateralStatus } from '../../../../common/constants' +import { + getDeploymentFile, + getAssetCollDeploymentFilename, + IAssetCollDeployments, + getDeploymentFilename, + fileExists, +} from '../../common' +import { priceTimeout } from '../../utils' +import { SUSDSCollateral } from '../../../../typechain' +import { ContractFactory } from 'ethers' +import { ORACLE_ERROR, ORACLE_TIMEOUT } from '#/test/plugins/individual-collateral/sky/constants' + +async function main() { + // ==== Read Configuration ==== + const [deployer] = await hre.ethers.getSigners() + + const chainId = await getChainId(hre) + + console.log(`Deploying Collateral to network ${hre.network.name} (${chainId}) + with burner account: ${deployer.address}`) + + if (!networkConfig[chainId]) { + throw new Error(`Missing network configuration for ${hre.network.name}`) + } + + // Get phase1 deployment + const phase1File = getDeploymentFilename(chainId) + if (!fileExists(phase1File)) { + throw new Error(`${phase1File} doesn't exist yet. Run phase 1`) + } + // Check previous step completed + const assetCollDeploymentFilename = getAssetCollDeploymentFilename(chainId) + const assetCollDeployments = getDeploymentFile(assetCollDeploymentFilename) + + const deployedCollateral: string[] = [] + + /******** Deploy SUSDS Collateral - sUSDS **************************/ + + const SUSDSCollateralFactory: ContractFactory = await hre.ethers.getContractFactory( + 'SUSDSCollateral' + ) + + const collateral = await SUSDSCollateralFactory.connect(deployer).deploy( + { + priceTimeout: priceTimeout.toString(), + chainlinkFeed: networkConfig[chainId].chainlinkFeeds.USDS, + oracleError: ORACLE_ERROR.toString(), // 0.3% + erc20: networkConfig[chainId].tokens.sUSDS, + maxTradeVolume: fp('1e6').toString(), // $1m, + oracleTimeout: ORACLE_TIMEOUT.toString(), // 24h + targetName: hre.ethers.utils.formatBytes32String('USD'), + defaultThreshold: ORACLE_ERROR.add(fp('0.01')).toString(), // 1.3% + delayUntilDefault: bn('86400').toString(), // 24h + }, + bn(0) + ) + await collateral.deployed() + + console.log(`Deployed sUSDS to ${hre.network.name} (${chainId}): ${collateral.address}`) + + await (await collateral.refresh()).wait() + expect(await collateral.status()).to.equal(CollateralStatus.SOUND) + + assetCollDeployments.collateral.sUSDS = collateral.address + assetCollDeployments.erc20s.sUSDS = networkConfig[chainId].tokens.sUSDS + deployedCollateral.push(collateral.address.toString()) + + fs.writeFileSync(assetCollDeploymentFilename, JSON.stringify(assetCollDeployments, null, 2)) + + console.log(`Deployed collateral to ${hre.network.name} (${chainId}) + New deployments: ${deployedCollateral} + Deployment file: ${assetCollDeploymentFilename}`) +} + +main().catch((error) => { + console.error(error) + process.exitCode = 1 +}) diff --git a/scripts/verification/collateral-plugins/verify_susds.ts b/scripts/verification/collateral-plugins/verify_susds.ts new file mode 100644 index 0000000000..3773fa443e --- /dev/null +++ b/scripts/verification/collateral-plugins/verify_susds.ts @@ -0,0 +1,57 @@ +import hre from 'hardhat' +import { getChainId } from '../../../common/blockchain-utils' +import { developmentChains, networkConfig } from '../../../common/configuration' +import { fp, bn } from '../../../common/numbers' +import { + getDeploymentFile, + getAssetCollDeploymentFilename, + IAssetCollDeployments, +} from '../../deployment/common' +import { priceTimeout, verifyContract } from '../../deployment/utils' +import { + ORACLE_ERROR, + ORACLE_TIMEOUT, +} from '../../../test/plugins/individual-collateral/sky/constants' + +let deployments: IAssetCollDeployments + +async function main() { + // ********** Read config ********** + const chainId = await getChainId(hre) + if (!networkConfig[chainId]) { + throw new Error(`Missing network configuration for ${hre.network.name}`) + } + + if (developmentChains.includes(hre.network.name)) { + throw new Error(`Cannot verify contracts for development chain ${hre.network.name}`) + } + + const assetCollDeploymentFilename = getAssetCollDeploymentFilename(chainId) + deployments = getDeploymentFile(assetCollDeploymentFilename) + + /******** Verify sUSDS **************************/ + await verifyContract( + chainId, + deployments.collateral.sUSDS, + [ + { + priceTimeout: priceTimeout.toString(), + chainlinkFeed: networkConfig[chainId].chainlinkFeeds.USDS, + oracleError: ORACLE_ERROR.toString(), // 0.3% + erc20: networkConfig[chainId].tokens.sUSDS, + maxTradeVolume: fp('1e6').toString(), // $1m, + oracleTimeout: ORACLE_TIMEOUT.toString(), // 24h + targetName: hre.ethers.utils.formatBytes32String('USD'), + defaultThreshold: ORACLE_ERROR.add(fp('0.01')).toString(), // 1.3% + delayUntilDefault: bn('86400').toString(), // 24h + }, + bn(0), + ], + 'contracts/plugins/assets/sky/SUSDSCollateral.sol:SUSDSCollateral' + ) +} + +main().catch((error) => { + console.error(error) + process.exitCode = 1 +}) diff --git a/scripts/verify_etherscan.ts b/scripts/verify_etherscan.ts index f2d5950c2f..83817e1353 100644 --- a/scripts/verify_etherscan.ts +++ b/scripts/verify_etherscan.ts @@ -81,7 +81,8 @@ async function main() { 'collateral-plugins/verify_ethx.ts', 'collateral-plugins/verify_apxeth.ts', 'collateral-plugins/verify_USDe.ts', - 'collateral-plugins/verify_pyusd.ts' + 'collateral-plugins/verify_pyusd.ts', + 'collateral-plugins/verify_susds.ts' ) } else if (chainId == '8453' || chainId == '84531') { // Base L2 chains diff --git a/test/integration/fork-block-numbers.ts b/test/integration/fork-block-numbers.ts index fe2541150a..ca7f078db5 100644 --- a/test/integration/fork-block-numbers.ts +++ b/test/integration/fork-block-numbers.ts @@ -11,7 +11,7 @@ const forkBlockNumber = { 'mainnet-3.4.0': 20328530, // Ethereum // TODO add all the block numbers we fork from to benefit from caching - default: 20679946, // Ethereum + default: 20890018, // Ethereum } export default forkBlockNumber diff --git a/test/plugins/individual-collateral/aave-v3/common.ts b/test/plugins/individual-collateral/aave-v3/common.ts index f9f22f6a21..77e11f1be0 100644 --- a/test/plugins/individual-collateral/aave-v3/common.ts +++ b/test/plugins/individual-collateral/aave-v3/common.ts @@ -210,7 +210,6 @@ export const makeTests = (defaultCollateralOpts: CollateralParams, altParams: Al itChecksRefPerTokDefault: it, itHasRevenueHiding: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itIsPricedByPeg: true, chainlinkDefaultAnswer: 1e8, itChecksPriceChanges: it, diff --git a/test/plugins/individual-collateral/aerodrome/AerodromeStableCollateral.test.ts b/test/plugins/individual-collateral/aerodrome/AerodromeStableCollateral.test.ts index bd6c9e5185..48eca43423 100644 --- a/test/plugins/individual-collateral/aerodrome/AerodromeStableCollateral.test.ts +++ b/test/plugins/individual-collateral/aerodrome/AerodromeStableCollateral.test.ts @@ -450,7 +450,6 @@ all.forEach((curr: AeroStablePoolEnumeration) => { itChecksRefPerTokDefault: it.skip, itChecksPriceChanges: it.skip, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it.skip, itHasRevenueHiding: it.skip, resetFork, collateralName: curr.testName, diff --git a/test/plugins/individual-collateral/ankr/AnkrEthCollateralTestSuite.test.ts b/test/plugins/individual-collateral/ankr/AnkrEthCollateralTestSuite.test.ts index ed9bae870c..8a3a07a83f 100644 --- a/test/plugins/individual-collateral/ankr/AnkrEthCollateralTestSuite.test.ts +++ b/test/plugins/individual-collateral/ankr/AnkrEthCollateralTestSuite.test.ts @@ -291,7 +291,6 @@ const opts = { itChecksPriceChanges: it, itHasRevenueHiding: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, resetFork, collateralName: 'AnkrStakedETH', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/cbeth/CBETHCollateral.test.ts b/test/plugins/individual-collateral/cbeth/CBETHCollateral.test.ts index 6dea339bce..cd35ee5c0c 100644 --- a/test/plugins/individual-collateral/cbeth/CBETHCollateral.test.ts +++ b/test/plugins/individual-collateral/cbeth/CBETHCollateral.test.ts @@ -248,7 +248,6 @@ const opts = { itChecksPriceChanges: it, itHasRevenueHiding: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, resetFork, collateralName: 'CBEthCollateral', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/cbeth/CBETHCollateralL2.test.ts b/test/plugins/individual-collateral/cbeth/CBETHCollateralL2.test.ts index 7e1a28744c..a4a9c32425 100644 --- a/test/plugins/individual-collateral/cbeth/CBETHCollateralL2.test.ts +++ b/test/plugins/individual-collateral/cbeth/CBETHCollateralL2.test.ts @@ -279,7 +279,6 @@ const opts = { itChecksPriceChanges: it, itHasRevenueHiding: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, resetFork, collateralName: 'CBEthCollateralL2', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/collateralTests.ts b/test/plugins/individual-collateral/collateralTests.ts index bd6cab8e05..6db2039edc 100644 --- a/test/plugins/individual-collateral/collateralTests.ts +++ b/test/plugins/individual-collateral/collateralTests.ts @@ -87,7 +87,6 @@ export default function fn( itChecksRefPerTokDefault, itChecksPriceChanges, itChecksNonZeroDefaultThreshold, - itChecksMainChainlinkOracleRevert, itHasRevenueHiding, itIsPricedByPeg, itHasOracleRefPerTok, @@ -395,32 +394,29 @@ export default function fn( ) // within 1-part-in-1-thousand }) - itChecksMainChainlinkOracleRevert( - 'reverts if Chainlink feed reverts or runs out of gas, maintains status', - async () => { - const InvalidMockV3AggregatorFactory = await ethers.getContractFactory( - 'InvalidMockV3Aggregator' - ) - const invalidChainlinkFeed = ( - await InvalidMockV3AggregatorFactory.deploy(8, chainlinkDefaultAnswer) - ) + it('reverts if Chainlink feed reverts or runs out of gas, maintains status', async () => { + const InvalidMockV3AggregatorFactory = await ethers.getContractFactory( + 'InvalidMockV3Aggregator' + ) + const invalidChainlinkFeed = ( + await InvalidMockV3AggregatorFactory.deploy(8, chainlinkDefaultAnswer) + ) - const invalidCollateral = await deployCollateral({ - erc20: ctx.tok.address, - chainlinkFeed: invalidChainlinkFeed.address, - }) + const invalidCollateral = await deployCollateral({ + erc20: ctx.tok.address, + chainlinkFeed: invalidChainlinkFeed.address, + }) - // Reverting with no reason - await invalidChainlinkFeed.setSimplyRevert(true) - await expect(invalidCollateral.refresh()).to.be.revertedWithoutReason() - expect(await invalidCollateral.status()).to.equal(CollateralStatus.SOUND) + // Reverting with no reason + await invalidChainlinkFeed.setSimplyRevert(true) + await expect(invalidCollateral.refresh()).to.be.revertedWithoutReason() + expect(await invalidCollateral.status()).to.equal(CollateralStatus.SOUND) - // Runnning out of gas (same error) - await invalidChainlinkFeed.setSimplyRevert(false) - await expect(invalidCollateral.refresh()).to.be.revertedWithoutReason() - expect(await invalidCollateral.status()).to.equal(CollateralStatus.SOUND) - } - ) + // Runnning out of gas (same error) + await invalidChainlinkFeed.setSimplyRevert(false) + await expect(invalidCollateral.refresh()).to.be.revertedWithoutReason() + expect(await invalidCollateral.status()).to.equal(CollateralStatus.SOUND) + }) it('decays price over priceTimeout period', async () => { await collateral.refresh() diff --git a/test/plugins/individual-collateral/compoundv3/CometTestSuite.test.ts b/test/plugins/individual-collateral/compoundv3/CometTestSuite.test.ts index 5b5c7ba6f0..c0062e93db 100644 --- a/test/plugins/individual-collateral/compoundv3/CometTestSuite.test.ts +++ b/test/plugins/individual-collateral/compoundv3/CometTestSuite.test.ts @@ -384,7 +384,6 @@ allTests.forEach((curr: CTokenV3Enumeration) => { itChecksRefPerTokDefault: it.skip, // implemented in this file itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it.skip, // implemented in this file itIsPricedByPeg: true, resetFork: getResetFork(getForkBlock(curr.tokenName)), diff --git a/test/plugins/individual-collateral/dsr/SDaiCollateralTestSuite.test.ts b/test/plugins/individual-collateral/dsr/SDaiCollateralTestSuite.test.ts index 52549b7041..2919f0ebc4 100644 --- a/test/plugins/individual-collateral/dsr/SDaiCollateralTestSuite.test.ts +++ b/test/plugins/individual-collateral/dsr/SDaiCollateralTestSuite.test.ts @@ -215,7 +215,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it.skip, resetFork, collateralName: 'SDaiCollateral', diff --git a/test/plugins/individual-collateral/ethena/USDeFiatCollateral.test.ts b/test/plugins/individual-collateral/ethena/USDeFiatCollateral.test.ts index 6a6528d9f9..9624aaa70a 100644 --- a/test/plugins/individual-collateral/ethena/USDeFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/ethena/USDeFiatCollateral.test.ts @@ -211,7 +211,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, collateralName: 'USDe Fiat Collateral', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/ethx/ETHxCollateral.test.ts b/test/plugins/individual-collateral/ethx/ETHxCollateral.test.ts index b3c3804801..10b4da87c3 100644 --- a/test/plugins/individual-collateral/ethx/ETHxCollateral.test.ts +++ b/test/plugins/individual-collateral/ethx/ETHxCollateral.test.ts @@ -282,7 +282,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork, collateralName: 'Stader ETHx', diff --git a/test/plugins/individual-collateral/flux-finance/FTokenFiatCollateral.test.ts b/test/plugins/individual-collateral/flux-finance/FTokenFiatCollateral.test.ts index eabfa12690..180a889352 100644 --- a/test/plugins/individual-collateral/flux-finance/FTokenFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/flux-finance/FTokenFiatCollateral.test.ts @@ -258,7 +258,6 @@ all.forEach((curr: FTokenEnumeration) => { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork, collateralName: curr.testName, diff --git a/test/plugins/individual-collateral/frax-eth/SFrxEthTestSuite.test.ts b/test/plugins/individual-collateral/frax-eth/SFrxEthTestSuite.test.ts index b25608382a..b15e1df41e 100644 --- a/test/plugins/individual-collateral/frax-eth/SFrxEthTestSuite.test.ts +++ b/test/plugins/individual-collateral/frax-eth/SFrxEthTestSuite.test.ts @@ -311,7 +311,6 @@ const opts = { itChecksPriceChanges: it, itHasRevenueHiding: it.skip, // implemented in this file itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, resetFork, collateralName: 'SFraxEthCollateral', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/frax/SFraxCollateralTestSuite.test.ts b/test/plugins/individual-collateral/frax/SFraxCollateralTestSuite.test.ts index e9ec2b3e2b..2ed9bc5e4d 100644 --- a/test/plugins/individual-collateral/frax/SFraxCollateralTestSuite.test.ts +++ b/test/plugins/individual-collateral/frax/SFraxCollateralTestSuite.test.ts @@ -195,7 +195,6 @@ const opts = { itChecksTargetPerRefDefault: it, itChecksTargetPerRefDefaultUp: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itHasRevenueHiding: it.skip, diff --git a/test/plugins/individual-collateral/lido/L2LidoStakedEthTestSuite.test.ts b/test/plugins/individual-collateral/lido/L2LidoStakedEthTestSuite.test.ts index 7ac7956e28..184b1090aa 100644 --- a/test/plugins/individual-collateral/lido/L2LidoStakedEthTestSuite.test.ts +++ b/test/plugins/individual-collateral/lido/L2LidoStakedEthTestSuite.test.ts @@ -278,7 +278,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK_BASE), collateralName: 'L2LidoStakedETH', diff --git a/test/plugins/individual-collateral/lido/LidoStakedEthTestSuite.test.ts b/test/plugins/individual-collateral/lido/LidoStakedEthTestSuite.test.ts index 09bb47a51f..366c8c81c2 100644 --- a/test/plugins/individual-collateral/lido/LidoStakedEthTestSuite.test.ts +++ b/test/plugins/individual-collateral/lido/LidoStakedEthTestSuite.test.ts @@ -269,7 +269,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork, collateralName: 'LidoStakedETH', diff --git a/test/plugins/individual-collateral/meta-morpho/MetaMorphoFiatCollateral.test.ts b/test/plugins/individual-collateral/meta-morpho/MetaMorphoFiatCollateral.test.ts index 05429c1535..f8138befb4 100644 --- a/test/plugins/individual-collateral/meta-morpho/MetaMorphoFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/meta-morpho/MetaMorphoFiatCollateral.test.ts @@ -175,7 +175,6 @@ const makeFiatCollateralTestSuite = ( itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK), targetNetwork: defaultCollateralOpts.forkNetwork, diff --git a/test/plugins/individual-collateral/meta-morpho/MetaMorphoSelfReferentialCollateral.test.ts b/test/plugins/individual-collateral/meta-morpho/MetaMorphoSelfReferentialCollateral.test.ts index 44b009bd61..d243ec85aa 100644 --- a/test/plugins/individual-collateral/meta-morpho/MetaMorphoSelfReferentialCollateral.test.ts +++ b/test/plugins/individual-collateral/meta-morpho/MetaMorphoSelfReferentialCollateral.test.ts @@ -171,7 +171,6 @@ const makeFiatCollateralTestSuite = ( itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it.skip, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK), targetNetwork: defaultCollateralOpts.forkNetwork, diff --git a/test/plugins/individual-collateral/morpho-aave/MorphoAAVEFiatCollateral.test.ts b/test/plugins/individual-collateral/morpho-aave/MorphoAAVEFiatCollateral.test.ts index 27f971c04b..9a9b94fad7 100644 --- a/test/plugins/individual-collateral/morpho-aave/MorphoAAVEFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/morpho-aave/MorphoAAVEFiatCollateral.test.ts @@ -368,7 +368,6 @@ const makeAaveFiatCollateralTestSuite = ( itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK), collateralName, diff --git a/test/plugins/individual-collateral/morpho-aave/MorphoAAVENonFiatCollateral.test.ts b/test/plugins/individual-collateral/morpho-aave/MorphoAAVENonFiatCollateral.test.ts index e846ec7e87..937ec99e70 100644 --- a/test/plugins/individual-collateral/morpho-aave/MorphoAAVENonFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/morpho-aave/MorphoAAVENonFiatCollateral.test.ts @@ -229,7 +229,6 @@ const makeAaveNonFiatCollateralTestSuite = ( itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, itIsPricedByPeg: true, resetFork: getResetFork(FORK_BLOCK), diff --git a/test/plugins/individual-collateral/morpho-aave/MorphoAAVESelfReferentialCollateral.test.ts b/test/plugins/individual-collateral/morpho-aave/MorphoAAVESelfReferentialCollateral.test.ts index 71100d2a38..81404fe208 100644 --- a/test/plugins/individual-collateral/morpho-aave/MorphoAAVESelfReferentialCollateral.test.ts +++ b/test/plugins/individual-collateral/morpho-aave/MorphoAAVESelfReferentialCollateral.test.ts @@ -229,7 +229,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it.skip, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK), collateralName: 'MorphoAAVEV2SelfReferentialCollateral - WETH', diff --git a/test/plugins/individual-collateral/mountain/USDMCollateral.test.ts b/test/plugins/individual-collateral/mountain/USDMCollateral.test.ts index 3605c491a5..570c60345f 100644 --- a/test/plugins/individual-collateral/mountain/USDMCollateral.test.ts +++ b/test/plugins/individual-collateral/mountain/USDMCollateral.test.ts @@ -311,7 +311,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it.skip, // implemented in this file collateralName: 'USDM Collateral', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/pirex-eth/ApxEthCollateral.test.ts b/test/plugins/individual-collateral/pirex-eth/ApxEthCollateral.test.ts index e49008c64e..db143ad603 100644 --- a/test/plugins/individual-collateral/pirex-eth/ApxEthCollateral.test.ts +++ b/test/plugins/individual-collateral/pirex-eth/ApxEthCollateral.test.ts @@ -378,7 +378,6 @@ const opts = { itChecksRefPerTokDefault: it.skip, // implemented in this file itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it.skip, // implemented in this file resetFork, collateralName: 'ApxETH', diff --git a/test/plugins/individual-collateral/pluginTestTypes.ts b/test/plugins/individual-collateral/pluginTestTypes.ts index d65722bf84..837e5a258d 100644 --- a/test/plugins/individual-collateral/pluginTestTypes.ts +++ b/test/plugins/individual-collateral/pluginTestTypes.ts @@ -106,9 +106,6 @@ export interface CollateralTestSuiteFixtures // toggle on or off: tests that check that defaultThreshold is not zero itChecksNonZeroDefaultThreshold: Mocha.TestFunction | Mocha.PendingTestFunction - // toggle on or off: tests that check when the main chainlink feed reverts (not always used) - itChecksMainChainlinkOracleRevert: Mocha.TestFunction | Mocha.PendingTestFunction - // does the peg price matter for the results of tryPrice()? itIsPricedByPeg?: boolean diff --git a/test/plugins/individual-collateral/rocket-eth/RethCollateralTestSuite.test.ts b/test/plugins/individual-collateral/rocket-eth/RethCollateralTestSuite.test.ts index 48017d2648..f766a3bc08 100644 --- a/test/plugins/individual-collateral/rocket-eth/RethCollateralTestSuite.test.ts +++ b/test/plugins/individual-collateral/rocket-eth/RethCollateralTestSuite.test.ts @@ -276,7 +276,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork, collateralName: 'RocketPoolETH', diff --git a/test/plugins/individual-collateral/sky/SUSDSCollateralTestSuite.test.ts b/test/plugins/individual-collateral/sky/SUSDSCollateralTestSuite.test.ts new file mode 100644 index 0000000000..538e19fa62 --- /dev/null +++ b/test/plugins/individual-collateral/sky/SUSDSCollateralTestSuite.test.ts @@ -0,0 +1,226 @@ +import collateralTests from '../collateralTests' +import { CollateralFixtureContext, CollateralOpts, MintCollateralFunc } from '../pluginTestTypes' +import { resetFork, mintSUSDS } from './helpers' +import { ethers } from 'hardhat' +import { expect } from 'chai' +import { ContractFactory, BigNumberish, BigNumber } from 'ethers' +import { + ERC20Mock, + IERC20Metadata, + MockV3Aggregator, + MockV3Aggregator__factory, + TestICollateral, +} from '../../../../typechain' +import { pushOracleForward } from '../../../utils/oracles' +import { bn, fp } from '../../../../common/numbers' +import { ZERO_ADDRESS } from '../../../../common/constants' +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' +import { + ORACLE_ERROR, + ORACLE_TIMEOUT, + PRICE_TIMEOUT, + MAX_TRADE_VOL, + DEFAULT_THRESHOLD, + DELAY_UNTIL_DEFAULT, + USDS_USD_PRICE_FEED, + SUSDS, +} from './constants' +import { setCode } from '@nomicfoundation/hardhat-network-helpers' + +/* + Define deployment functions +*/ + +export const defaultSUSDSCollateralOpts: CollateralOpts = { + erc20: SUSDS, + targetName: ethers.utils.formatBytes32String('USD'), + rewardERC20: ZERO_ADDRESS, + priceTimeout: PRICE_TIMEOUT, + chainlinkFeed: USDS_USD_PRICE_FEED, + oracleTimeout: ORACLE_TIMEOUT, + oracleError: ORACLE_ERROR, + maxTradeVolume: MAX_TRADE_VOL, + defaultThreshold: DEFAULT_THRESHOLD, + delayUntilDefault: DELAY_UNTIL_DEFAULT, + revenueHiding: fp('0'), +} + +export const deployCollateral = async (opts: CollateralOpts = {}): Promise => { + opts = { ...defaultSUSDSCollateralOpts, ...opts } + + const SUSDSCollateralFactory: ContractFactory = await ethers.getContractFactory('SUSDSCollateral') + const collateral = await SUSDSCollateralFactory.deploy( + { + erc20: opts.erc20, + targetName: opts.targetName, + priceTimeout: opts.priceTimeout, + chainlinkFeed: opts.chainlinkFeed, + oracleError: opts.oracleError, + oracleTimeout: opts.oracleTimeout, + maxTradeVolume: opts.maxTradeVolume, + defaultThreshold: opts.defaultThreshold, + delayUntilDefault: opts.delayUntilDefault, + }, + opts.revenueHiding, + { gasLimit: 2000000000 } + ) + await collateral.deployed() + + // Push forward chainlink feed + await pushOracleForward(opts.chainlinkFeed!) + + // sometimes we are trying to test a negative test case and we want this to fail silently + // fortunately this syntax fails silently because our tools are terrible + await expect(collateral.refresh()) + + return collateral +} + +const chainlinkDefaultAnswer = bn('1e8') + +type Fixture = () => Promise + +const makeCollateralFixtureContext = ( + alice: SignerWithAddress, + opts: CollateralOpts = {} +): Fixture => { + const collateralOpts = { ...defaultSUSDSCollateralOpts, ...opts } + + const makeCollateralFixtureContext = async () => { + const MockV3AggregatorFactory = ( + await ethers.getContractFactory('MockV3Aggregator') + ) + + const chainlinkFeed = ( + await MockV3AggregatorFactory.deploy(8, chainlinkDefaultAnswer) + ) + collateralOpts.chainlinkFeed = chainlinkFeed.address + + const susds = (await ethers.getContractAt('IERC20Metadata', SUSDS)) as IERC20Metadata + const rewardToken = (await ethers.getContractAt('ERC20Mock', ZERO_ADDRESS)) as ERC20Mock + const collateral = await deployCollateral(collateralOpts) + const tok = await ethers.getContractAt('IERC20Metadata', await collateral.erc20()) + + return { + alice, + collateral, + chainlinkFeed, + tok, + susds, + rewardToken, + } + } + + return makeCollateralFixtureContext +} + +const mintCollateralTo: MintCollateralFunc = async ( + ctx: CollateralFixtureContext, + amount: BigNumberish, + user: SignerWithAddress, + recipient: string +) => { + await mintSUSDS(ctx.tok, user, amount, recipient) +} + +const reduceTargetPerRef = async (ctx: CollateralFixtureContext, pctDecrease: BigNumberish) => { + const lastRound = await ctx.chainlinkFeed.latestRoundData() + const nextAnswer = lastRound.answer.sub(lastRound.answer.mul(pctDecrease).div(100)) + await ctx.chainlinkFeed.updateAnswer(nextAnswer) +} + +const increaseTargetPerRef = async (ctx: CollateralFixtureContext, pctIncrease: BigNumberish) => { + const lastRound = await ctx.chainlinkFeed.latestRoundData() + const nextAnswer = lastRound.answer.add(lastRound.answer.mul(pctIncrease).div(100)) + await ctx.chainlinkFeed.updateAnswer(nextAnswer) +} + +const changeRefPerTok = async (ctx: CollateralFixtureContext, percentChange: BigNumberish) => { + // get current chi + const collateral = await ethers.getContractAt('SUSDSCollateral', ctx.collateral.address) + const susds = await ethers.getContractAt('ISUsds', await collateral.erc20()) + await susds.drip() + + const chi = await susds.chi() + + // save old bytecode + const oldBytecode = await network.provider.send('eth_getCode', [susds.address]) + + // replace with mock (includes setter) + const mockFactory = await ethers.getContractFactory('SUsdsMock') + const mock = await mockFactory.deploy(await susds.usdsJoin(), await susds.vow()) + const bytecode = await network.provider.send('eth_getCode', [mock.address]) + await setCode(susds.address, bytecode) + + // set new rate + const susdsAsMock = await ethers.getContractAt('SUsdsMock', susds.address) + const newChi = chi.add(chi.mul(bn(percentChange)).div(bn('100'))) + await susdsAsMock.setChi(newChi) + + // restore bytecode + await setCode(susds.address, oldBytecode) +} + +const reduceRefPerTok = async (ctx: CollateralFixtureContext, pctDecrease: BigNumberish) => { + await changeRefPerTok(ctx, bn(pctDecrease).mul(-1)) +} + +const increaseRefPerTok = async (ctx: CollateralFixtureContext, pctIncrease: BigNumberish) => { + await changeRefPerTok(ctx, bn(pctIncrease)) +} + +const getExpectedPrice = async (ctx: CollateralFixtureContext): Promise => { + const clData = await ctx.chainlinkFeed.latestRoundData() + const clDecimals = await ctx.chainlinkFeed.decimals() + + const refPerTok = await ctx.collateral.refPerTok() + return clData.answer + .mul(bn(10).pow(18 - clDecimals)) + .mul(refPerTok) + .div(fp('1')) +} + +/* + Define collateral-specific tests +*/ + +// eslint-disable-next-line @typescript-eslint/no-empty-function +const collateralSpecificConstructorTests = () => {} + +// eslint-disable-next-line @typescript-eslint/no-empty-function +const collateralSpecificStatusTests = () => {} + +// eslint-disable-next-line @typescript-eslint/no-empty-function +const beforeEachRewardsTest = async () => {} + +/* + Run the test suite +*/ + +const opts = { + deployCollateral, + collateralSpecificConstructorTests, + collateralSpecificStatusTests, + beforeEachRewardsTest, + makeCollateralFixtureContext, + mintCollateralTo, + reduceTargetPerRef, + increaseTargetPerRef, + reduceRefPerTok, + increaseRefPerTok, + getExpectedPrice, + itClaimsRewards: it.skip, + itChecksTargetPerRefDefault: it, + itChecksTargetPerRefDefaultUp: it, + itChecksRefPerTokDefault: it, + itChecksPriceChanges: it, + itChecksNonZeroDefaultThreshold: it, + itHasRevenueHiding: it.skip, + resetFork, + collateralName: 'SUSDSCollateral', + chainlinkDefaultAnswer, + itIsPricedByPeg: true, + toleranceDivisor: bn('1e8'), +} + +collateralTests(opts) diff --git a/test/plugins/individual-collateral/sky/constants.ts b/test/plugins/individual-collateral/sky/constants.ts new file mode 100644 index 0000000000..e453e68155 --- /dev/null +++ b/test/plugins/individual-collateral/sky/constants.ts @@ -0,0 +1,20 @@ +import { bn, fp } from '../../../../common/numbers' +import { networkConfig } from '../../../../common/configuration' + +// Mainnet Addresses +export const RSR = networkConfig['31337'].tokens.RSR as string + +// SUSDS +export const USDS_USD_PRICE_FEED = networkConfig['31337'].chainlinkFeeds.USDS as string +export const USDS = networkConfig['31337'].tokens.USDS as string +export const SUSDS = networkConfig['31337'].tokens.sUSDS as string +export const SUSDS_HOLDER = '0x2d4d2A025b10C09BDbd794B4FCe4F7ea8C7d7bB4' + +export const PRICE_TIMEOUT = bn('604800') // 1 week +export const ORACLE_TIMEOUT = bn(86400) // 24 hours in seconds +export const ORACLE_ERROR = fp('0.003') // 0.3% +export const DEFAULT_THRESHOLD = fp('0.05') +export const DELAY_UNTIL_DEFAULT = bn(86400) +export const MAX_TRADE_VOL = bn(1000) + +export const FORK_BLOCK = 20890018 diff --git a/test/plugins/individual-collateral/sky/helpers.ts b/test/plugins/individual-collateral/sky/helpers.ts new file mode 100644 index 0000000000..2652d0f46b --- /dev/null +++ b/test/plugins/individual-collateral/sky/helpers.ts @@ -0,0 +1,19 @@ +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' +import { IERC20Metadata } from '../../../../typechain' +import { whileImpersonating } from '../../../utils/impersonation' +import { BigNumberish } from 'ethers' +import { FORK_BLOCK, SUSDS_HOLDER } from './constants' +import { getResetFork } from '../helpers' + +export const mintSUSDS = async ( + susds: IERC20Metadata, + account: SignerWithAddress, + amount: BigNumberish, + recipient: string +) => { + await whileImpersonating(SUSDS_HOLDER, async (whale) => { + await susds.connect(whale).transfer(recipient, amount) + }) +} + +export const resetFork = getResetFork(FORK_BLOCK) diff --git a/test/plugins/individual-collateral/stargate/StargateUSDCTestSuite.test.ts_DEPRECATED b/test/plugins/individual-collateral/stargate/StargateUSDCTestSuite.test.ts_DEPRECATED index f3e64455d8..009ffdf1a8 100644 --- a/test/plugins/individual-collateral/stargate/StargateUSDCTestSuite.test.ts_DEPRECATED +++ b/test/plugins/individual-collateral/stargate/StargateUSDCTestSuite.test.ts_DEPRECATED @@ -316,7 +316,6 @@ export const stableOpts = { itChecksTargetPerRefDefaultUp: it, itChecksRefPerTokDefault: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, itIsPricedByPeg: true, chainlinkDefaultAnswer: 1e8, diff --git a/test/plugins/individual-collateral/yearnv2/YearnV2CurveFiatCollateral.test.ts b/test/plugins/individual-collateral/yearnv2/YearnV2CurveFiatCollateral.test.ts index 9b34573b70..22017205a9 100644 --- a/test/plugins/individual-collateral/yearnv2/YearnV2CurveFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/yearnv2/YearnV2CurveFiatCollateral.test.ts @@ -260,7 +260,6 @@ tests.forEach((test: CurveFiatTest) => { itChecksTargetPerRefDefault: it, itChecksTargetPerRefDefaultUp: it, itChecksRefPerTokDefault: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, itClaimsRewards: it.skip, isMetapool: false,