Skip to main content

Architecture Overview

The APWine core protocol is divided in a set of contracts that allow for modularity and easy integration of new platforms. The protocol overview described here regroups most of the deployed contracts for the V1 launch and are subject to changes in the future.

Main Contracts#

Futures#

Futures regroup the core logic of the future instrument for any type of asset. They are responsible for tracking the generated yield and management of PTs and FYTs.

Vault#

The FutureVault stores interest-bearing assets during the ongoing period and tracks the generated yield at any time. Most of the state-changing functions are available to execute through the controller, while all getters are directly implemented on the FutureVault itself.

Wallet#

The FutureWallet stores the yield of previous periods, waiting to be redeemed. As opposed to FutureVault, direct interactions are allowed without going through the Controller.

Controller#

The Controller contract acts as a proxy to control and interact with the FutureVault contracts. It allows users to deposit and withdraw funds for a given Future, as well as more general methods for managing Futures (e.g. starting all Futures for a given time period).

Registry#

The Registry is a data store for addresses of all core protocol contracts.