Asset Pricing
Last updated
Last updated
The pricing of assets is done via an on-chain append-only Registry.
The Arcadia Registry is not a monolithic smart contract containing all logic. It consists of a main coordinating smart contract (also referred to as The Registry) and multiple append-only Modules.
Each Module is a separate smart contract with the pricing logic for specific Oracle implementations or specific Asset types. The Registry keeps mappings of which Modules to use for each asset.
Modules can only be appended to the Registry, not removed or overwritten. This ensures that Pricing logic is immutable, but it still gives flexibility to add new assets, or implement more efficient Pricing logic over time.
The Oracle Module implements the logic to convert the oracle-rate of different oracle technologies into a standardized format. Each different oracle implementation (e.g. Chainlink oracles, Pyth oracles, Uniswap TWAPs...) has its own Oracle Module.
Just like Oracle Modules implement the logic to return oracle-rates in a standardized format, Asset Modules will return Asset values in a standardized format. Similar to how each oracle implementation has its own oracle Module, each asset type has its own Asset Module.
Next to pricing logic, Asset Modules also store and manage asset specific risk parameters.
Asset Modules can be further divided into two distinct groups: Primary Asset Modules and Derived Asset Modules.
Primary assets are defined as assets that are not composed of other assets. For example: USDC, wETH and AERO. Primary Assets must be priced using one or more on-chain oracles.
Derived Assets are defined as assets that are composed of one or more underlying assets (which can be Primary Assets or other Derived Assets). Examples of Derived Assets are liquidity positions of AMMs, staked assets, yield bearing tokens.
To value a certain amount of a Derived Asset, the Asset Module has to:
Decompose the asset in its underlying assets.
Calculate the values of the corresponding underlying asset amounts.
Sum the values of its underlying assets.
The Asset Module luckily does not have to implement the pricing logic for each Underlying Asset, it can just ask the Arcadia Registry recursively what the values are for each of the Underlying Assets (Step 4 and 9)!
This goes on until the underlying asset is not composed of any other assets (also referred to as Primary Assets), and we use an on-chain Oracle to determine its value (Step 6, 11 and 13).
Lets use the example of an Aerodrome WETH-USDC pool, that is staked and earns Aero rewards:
The staked position has as underlying assets the Liquidity position and the aero rewards (a Primary Asset). The Liquidity position is further composed of both WETH and USDC (two primary assets).
The whole flow to price this asset is as follows:
While this recursive process may look complex, only one function per Asset Module (no matter what type of asset) has to be implemented, the conversion of an amount of the composed token into the amounts of its underlying tokens (step 3 and 8).
All other steps are orchestrated by the Registry, and had to be implemented just once!