Skip to main content

Smart contract overview

Swaap Earn is based on Sommelier’s infrastructure, with a few twists. The blockchain approach used by Sommelier to ensure the validity of the operations performed by the strategist has been removed. Instead, Swaap Earn focuses on additional safeguards at each protocol’s level which limit any damage that could arise from the strategists’ operations going wrong.

As in the Sommelier’s infrastructure, the following key smart contracts are deployed:

Registry - contains global configuration for Funds. It includes references to other smart contracts. It also has permissions layers for adaptors and Funds.

PriceRouter - global Funds pricing contract, typically using Chainlink. Built to price complex multi-token Funds positions (e.g. LP positions). Price Router upgrades now allow for other price sources. They can be used when Chainlink is not suitable.

Funds - user-facing ERC-4626 vaults where strategists deploy assets to earn yield. Each Fund is run by an assigned strategist. They deploy assets to use various independent methods to earn yield.

Adaptors - integration contracts that allow Funds to interact with an external DeFi protocol. Adaptors should be case-specific. A Fund may use many adaptors for complex DeFi operations.

The strategist role covers vault rebalancing. It also covers collateral management and automatic market monitoring.