Skip to content

Commit

Permalink
fix: removed custom bond config
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnyxos committed Oct 10, 2023
1 parent 945587c commit f123031
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
7 changes: 1 addition & 6 deletions src/v2/oracles/individual/UmaV2AssertionProvider.sol
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,12 @@ contract UmaV2AssertionProvider is Ownable {
coverageStart,
ANCILLARY_TAIL
);
currency.approve(address(oo), requiredBond);
oo.requestPrice(
PRICE_IDENTIFIER,
block.timestamp,
_bytesAncillary,
currency,
0
);
oo.setBond(
PRICE_IDENTIFIER,
block.timestamp,
_bytesAncillary,
requiredBond
);
oo.setCustomLiveness(
Expand Down
7 changes: 1 addition & 6 deletions src/v2/oracles/individual/UmaV2PriceProvider.sol
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,12 @@ contract UmaV2PriceProvider is Ownable {
if (pendingAnswer.startedAt != 0) revert RequestInProgress();

bytes memory _bytesAncillary = abi.encodePacked(ancillaryData);
currency.approve(address(oo), requiredBond);
oo.requestPrice(
PRICE_IDENTIFIER,
block.timestamp,
_bytesAncillary,
currency,
0
);
oo.setBond(
PRICE_IDENTIFIER,
block.timestamp,
_bytesAncillary,
requiredBond
);
oo.setCustomLiveness(
Expand Down
2 changes: 1 addition & 1 deletion test/V2/oracles/individual/UmaV2AssertionProvider.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ contract UmaV2AssertionProviderTest is Helper {
umaDecimals = 8;
umaDescription = "FUSD/ETH";
umaCurrency = USDC_TOKEN;
// TODO: Need to review how the configuration section should be composed
ancillaryData = "q: Curve USDC pool on Arbitrum One was hacked or compromised leading to locked funds or >25% loss in TVL value after the timestamp of: ";
requiredBond = 1e6;

Expand All @@ -64,6 +63,7 @@ contract UmaV2AssertionProviderTest is Helper {
);
uint256 condition = 2;
umaV2AssertionProvider.setConditionType(marketId, condition);
deal(USDC_TOKEN, address(umaV2AssertionProvider), 1000e6);
}

////////////////////////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion test/V2/oracles/individual/UmaV2PriceProvider.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ contract UmaV2PriceProviderTest is Helper {
umaDecimals = 8;
umaDescription = "FUSD/USD";
umaCurrency = USDC_TOKEN;
ancillaryData = "base:FUSD,baseAddress:0x630410530785377d49992824a70b43bd5c482c9a,baseChain: 42161,quote:USD,quoteDetails:United States Dollar,rounding:6,fallback:"https://www.coingecko.com/en/coins/uma",configuration:{"type": "medianizer","minTimeBetweenUpdates": 60,"twapLength": 600,"medianizedFeeds":[{"type": "cryptowatch", "exchange": "coinbase-pro", "pair": "umausd" }, { "type": "cryptowatch", "exchange": "binance", "pair": "umausdt" }, { "type": "cryptowatch", "exchange": "okex", "pair": "umausdt" }]}";
ancillaryData = 'base:FUSD,baseAddress:0x630410530785377d49992824a70b43bd5c482c9a,baseChain: 42161,quote:USD,quoteDetails:United States Dollar,rounding:6,fallback:"https://www.coingecko.com/en/coins/uma",configuration:{"type": "medianizer","minTimeBetweenUpdates": 60,"twapLength": 600,"medianizedFeeds":[{"type": "cryptowatch", "exchange": "coinbase-pro", "pair": "umausd" }, { "type": "cryptowatch", "exchange": "binance", "pair": "umausdt" }, { "type": "cryptowatch", "exchange": "okex", "pair": "umausdt" }]}';
requiredBond = 1e6;

umaV2PriceProvider = new UmaV2PriceProvider(
Expand All @@ -65,6 +65,7 @@ contract UmaV2PriceProviderTest is Helper {
);
uint256 condition = 2;
umaV2PriceProvider.setConditionType(marketId, condition);
deal(USDC_TOKEN, address(umaV2PriceProvider), 1000e6);
}

////////////////////////////////////////////////
Expand Down

0 comments on commit f123031

Please sign in to comment.