Example Scenario
Consider a DeFindex with a single strategy: 100% allocation to XLM on Xycloans, while the DeFindex receives deposits in USDC. The price per share pps could be calculated as the amount of USDC one receives after withdrawing from Xycloans and swapping the XLM to USDC, divided by the total supply of dfTokens: Where:- pXLM(m) is the price of XLM in terms of USDC after liquidating m XLM.
- MXLM is the total amount of XLM held by the DeFindex.
- TdfTokens is the total supply of dfTokens.
Fixed Price Per Share Approach
Given the manipulation risk with a variable price per share, let’s consider using a fixed price per share. Assume p0 is the nominal (initial or fixed) price of XLM in USDC. The amount of USDC received by a user who swaps mXLM XLM for USDC will be: The price per share would then be: After burning dfTokens, the user should receive: Where:- mXLM is the amount of XLM the DeFindex needs to liquidate to pay the user.
- mdfTokens is the amount of dfTokens the user is burning to withdraw their share.
- Total Assets: The sum of the value of assets managed by all adapters plus any idle assets held directly by the DeFindex contract.
- Total Supply of dfTokens: The total number of dfTokens issued to users.
- DeFindex has three adapters managing different investments:
- Adapter A manages $50,000 in a liquidity pool.
- Adapter B manages $30,000 in a lending pool.
- Adapter C manages $20,000 in a staking protocol.
- The DeFindex contract holds an additional $10,000 in idle assets.