APY.Finance Integrates Leading Oracle Solution Chainlink to Help Secure Yield Optimization Strategies

APY Finance
APY.Finance
Published in
5 min readDec 6, 2021

We are excited to announce our official mainnet integration with Chainlink, the most widely used decentralized oracle solution throughout DeFi. Chainlink oracles are used to fetch and aggregate real-time data from various off-chain systems, which our smart contracts reference to swiftly and accurately route pooled capital across DeFi protocols according to various strategies. This is a significant step toward democratizing the governance of our automated smart contracts, which are designed to maximize yield in a secure, low-cost manner.

Integrating with Chainlink enable us to avoid the potential pitfalls around building and maintaining our own oracle solution, particularly because it has robust and time-tested infrastructure backed by high quality data. This helps ensure our oracle mechanism has air-tight security, hyper-reliability, and the most up-to-date off-chain values. This will assist us in a few specific use cases:

  • SECURITY. Because Chainlink pulls prices in real-time from numerous independent data aggregators like BraveNewCoin and Amberdata, our services will be more adequately protected against exchange downtime and flash-loan attacks, further mitigating potential security and financial risks.
  • SCALABILITY. Our Chainlink External Adapter, which calculates the TVL of our entire system off-chain before then pushing a single, aggregated value on-chain, was custom-built specifically for us to use as a composite index. This will allow automated TVL updates each and every time our pooled capital is deployed to a new strategy, reducing the amount of manual input from our developers. It also creates a much more scalable ecosystem without increasing costs, especially as we begin to utilize various tokens as part of a deployment strategy.
  • GAS EFFICIENCY. If we were to calculate TVL on-chain every time we used a new token or shifted liquidity, it would greatly increase the cost of keeping the TVL of our system updated. Chainlink, on the other hand, calculates TVL off-chain thanks to its OCR upgrade, which helps save gas costs. These savings are then passed onto the user, furthering our mission to reduce overall fees and lower the barrier to entry for yield farming.

In the future, we will look to pursue opportunities around using Chainlink Keepers to trigger the automated deployment of capital via smart contracts in response to a specific set of market conditions. In this instance, Chainlink will passively monitor for events that respond to this trigger and activate immediately, effectively managing the contract functions in a highly reliable and automated manner.

APY uses Chainlink oracles to obtain the system’s current TVL when calculating deposits and withdrawals. The custom Chainlink External Adapter references an on-chain registry that tracks the strategies being farmed by APY. Every time APY.Finance uses a new strategy or moves capital, the registry is updated on-chain dynamically to keep the TVL calculation accurate without requiring any manual changes to the Adapter.

Chainlink is integrated with APY for calculating deposits and withdrawals based on the system TVL. The custom Chainlink adapter references an on-chain registry that tracks the strategies being farmed by APY. Every time APY.Finance uses a new strategy or moves capital, the registry is updated dynamically to keep the TVL calculation accurate without requiring any manual changes to the Chainlink adapter.

Choosing Chainlink as our oracle solution of choice came after much evaluation of its pricing precision, proven reliability, and network scalability. Chainlink is the only solution we evaluated that demonstrably mitigates flash loan attacks, which is currently a huge vulnerability within DeFi. With our mission being to make our software as secure as it is intuitive, this is a critical component in our integration.

Furthermore, Chainlink’s off-chain aggregation of premium data sources provides the most precise values to calculate TVL, as well as helps keep gas costs down and creates a very scalable infrastructure. Finally, Chainlink has been a reliable, audited, and time-tested oracle solution within the DeFi space, and already helping secure tens of billions of dollars in on-chain value for leading projects like Aave and Synthetix. It’s because of these features and more that Chainlink has and continues to be our chosen oracle solution.

“Oracles are a mission-critical component of any yield aggregation platform. For a platform that combines many assets and strategies into a single pool, such as APY.Finance, oracle requirements become non-trivial. Chainlink had the best balance of security, precision, scalability, and gas efficiency for our use cases, enabling us to build a superior platform for users wanting to maximize yield.” — Will Shahda, CEO, APY.Finance

About APY.Finance

APY.Finance fully automates crypto yield strategies for traders to ensure the best, risk-adjusted yield. Unlike using individual strategies, APY.Finance uses technology to maximize and stabilize your returns across the latest, most innovative crypto yield strategies. APY.Finance simply gives crypto traders the best opportunities for success. Explore the APY.Finance Alpha Build and begin yield farming now.

About Chainlink

Chainlink is the industry standard for building, accessing, and selling oracle services needed to power hybrid smart contracts on any blockchain. Chainlink oracle networks provide smart contracts with a way to reliably connect to any external API and leverage secure off-chain computations for enabling feature-rich applications. Chainlink currently secures tens of billions of dollars across DeFi, insurance, gaming, and other major industries, and offers global enterprises and leading data providers a universal gateway to all blockchains.

Learn more about Chainlink by visiting chain.link or read the documentation at docs.chain.link. To discuss an integration, reach out to an expert.

--

--