Tranquil Finance currently uses an oracle stack based on Chainlink price feeds.
After migrating to use Chainlink oracles, this section is now only here for references purposes.
We use a 10-minute TWAP oracle for each supported Sushiswap pair. These oracles are based on the design recommended and supported by Uniswap V2, which also applies to the Sushiswap fork.
This type of TWAP oracle is resistant to flashloan attacks, like the recent exploit on CREAM Finance. However, one weakness of TWAP oracles is the freshness of the price in volatile market conditions. For this reason, we will keep conservative collateral factors for all markets until Chainlink oracles are integrated.
In addition to the TWAP oracles, the team also maintains a fallback oracle that kicks in if the TWAP oracle price is not fresh or the pair has insufficient liquidity. The prices are queried from Coingecko and periodically posted to the contract.
The team also have a suite of alerts paging us when anomalies occur, such as discrepancies in the oracle price. We will take swift and appropriate action to defend the assets deposited with the protocol.
Because the Sushiswap TWAP oracles require constant updates to maintain freshness, we have jobs to periodically make the update transactions. Additionally, we have implemented an economic incentive for the community to help keep the oracles up to date.
Anyone can claim a small amount of TRANQ that is slowly dripped by the faucet. In doing so, the transaction also updates the TWAP oracles. Harmony's low fees makes claiming from the faucet regularly worthwhile to do.
These are the main oracles for Tranquil Finance:
For our legacy UniswapOracle, each Sushiswap pair has its own TWAP oracle:
1WBTC / WONE
1ETH / WONE
1USDC / WONE
1USDT / WONE