Aave v2 FCM
Aave v2 FCM Contract
Voltz Protocol allows Fixed Takers who wish to fully collateralise their positions to do so by depositing underlying yield bearing assets (e.g. aUSDC from Aave v2) into the Full Collateralisation Module (FCM) linked to the MarginEngine.
Since different underlying yield bearing protocols have different mechanics that produce variable APYs, there needs to be a separate FCM contract logic for each underlying protocol powered by Voltz.
In order to better understand how an FCM functions, below we dive into the Aave v2 FCM implementation (FCM that operates on top of the Aave v2 lending pool).
Positions in the FCM are able to interact with the MarginEngine via the FCM, meaning that for the MarginEngine the FCM is yet another position with the exception that the FCM can be assumed to be fully collateralised, hence non-liquidatable.
When it comes to settlements, FCM and MarginEngine settle with each other in terms of the underlying tokens (e.g. USDC), this means that after maturity of the IRS pool, the positions in the Margin Engine can settle with the FCM by invoking a function call in the FCM that performs a withdrawal of yield bearing tokens in exchange for the underlying tokens (for settlement purposes).
The AaveFCM has three external functions accessible by traders on Voltz Protocol.
Please note that for the initial phase of the Voltz protocol mainnet launch, users who have supplied assets to the FCM will not accrue underling protocol rewards (ie COMP and AAVE). The Voltz Labs team will push an update in the coming weeks to allow for accruing and claiming of underling protocol rewards going forward.
The initiateFullyCollateralisedFixedTakerSwap function engages a trader in a fully collateralised fixed taker swap, i.e. it enables the trader to deposit the underlying yield bearing tokens (e.g. aUSDC) to fully collateralise the variable leg (liability) of their position. As part of the transaction, the trader needs to pay liquidity provider fees in underlying tokens (e.g. USDC).
function initiateFullyCollateralisedFixedTakerSwap(uint256 notional, uint160 sqrtPriceLimitX96) external nonpayable
Notional in yield bearing tokens covered by a fully collateralised fixed taker interest rate swap
The binary fixed point math representation of the sqrt price limit beyond which the fixed taker swap will not be executed with the VAMM
The unwindFullyCollateralisedFixedTakerSwap function lets a trader to fully or partially unwind their fully collateralised fixed taker position as long as their position is still fully collateralised post unwind. As part of the transaction, the trader needs to pay liquidity provider fees in underlying tokens (e.g. USDC).
function unwindFullyCollateralisedFixedTakerSwap(uint256 notionalToUnwind, uint160 sqrtPriceLimitX96) external nonpayable
The amount of notional in yield-bearing tokens to unwind.
The binary fixed point math representation of the sqrt price limit beyond which the variable taker swap will not be executed with the VAMM
The settleTrader function can only be called after a given IRS pool has matured. A position with an active fully collateralised interest rate swap can call settleTrader in order to settle cashflows with the pool and claim their fixed yield (by forgoing the variable yield).
function settleTrader() external nonpayable returns (int256 traderSettlementCashflow)
Settlement cashflow in terms of underlying tokens secured by the fully collateralised fixed taker post IRS pool maturity