Alluo Explained
  • Welcome
    • 🧭 The Basics
  • Getting Started
    • πŸ’» The DeFi Web App
      • ❓ Connecting to the app
      • 🚜 Depositing into the farms
      • πŸ™Œ Other basics
      • 🏦 Importing your Mobile app wallet to Metamask
      • 🧬 Add the polygon network manually in Metamask.
      • ⛓️ Bridging Stablecoins from another chain
    • πŸ“±The Mobile app
      • πŸ—οΈ Setting up your account
      • 🏦 Depositing money into the app
      • πŸ™Œ Other basics
      • πŸ” Exporting your private key
    • πŸ“–Tech deep dive: Contract Address Library
  • Understanding Alluo
    • πŸ’΅ How does Alluo get the yield?
      • 🐰 Going deeper into the Alluo protocol rabbit hole
    • 🧐 FAQ
  • Tokens & Tokenomics
    • πŸͺ™ The tokens
    • πŸ‘¨β€πŸ”¬Tech deep dive: Interest Bearing {asset} token
      • Depositing
      • Withdrawals
      • IbAlluo on different chains
      • StIbAlluo and Superfluid
        • A closer look at the integration between IbAlluo and StIbAlluo
      • Using the IbAlluo contract directly to create streams
      • Liquidity Handler and adapters
        • Deposit process with the Liquidity Handler
        • Withdraw process with the Liquidity Handler
    • πŸ“ˆ Tokenomics
    • πŸ‘¨β€πŸ”¬Tech deep dive: Boosting yield by compounding rewards
      • Deposit into the Vault
      • Withdraw from the Vault
      • Redeem rewards
      • Automatic boosting with Alluo
      • FraxConvex Vaults
      • Managing withdrawal requests in IERC4626
  • Decentralisation and Trust
    • πŸ—³οΈ Trustless governance and execution
    • πŸ‘¨β€πŸ”¬Tech deep dive: Vote Executor Architecture
      • Off chain votes to on chain data
      • Onchain data verifcation
      • Automated execution of votes
        • Tokenomics
        • Liquidity Direction
        • Setting APYs on farms
      • Cross chain execution of votes
      • Manually submitting vote results onchain
    • ↔️Alluo Exchange
      • Interacting with the Exchange
    • vlAlluo Architecture
    • Contracts upgrades
    • Investment strategies
      • πŸ“ˆFrax Convex Finance
        • Adding new pools into the strategy
        • Investing into a pool
  • More Advanced Features
    • πŸ” Repeat payments, streaming IbAlluo
  • Product Updates
    • πŸ‘Œ Product Roadmap: Building the right products
    • πŸ’» Web App releases
    • πŸ“± Mobile App releases
    • 🏎️ Alluo Boost
  • tutorial projects
    • Example: USDC to streaming 1 IbAlluo per second
    • Example: Using IbAlluoUSD and Ricochet to do capital efficient DCA into ETH
Powered by GitBook
On this page
  1. Decentralisation and Trust
  2. Investment strategies
  3. Frax Convex Finance

Investing into a pool

PreviousAdding new pools into the strategyNextπŸ” Repeat payments, streaming IbAlluo

Last updated 2 years ago

All investments are grouped by assetId.

  • 0 = USDC

  • 1 = EURT

  • 2 = WETH

  • 3 = WBTC

For each asset there are several investment strategies where funds can be allocated, as shown below in the diagram.

Investment happens in 3 steps:

const request1 = await executor.callStatic.encodeLiquidityCommand(_codeName, 6000);
const request2 = await executor.callStatic.encodeLiquidityCommand("Curve/Convex Mim+3CRV", 4000);

If we already have a position in other investment strategies corresponding to USDC, we should first exit those. For instance, if we had everything in Curve/FraxConvex Frax+USDC in the beginning, we should have called encodeLiquidityCommand('Curve/FraxConvex Frax+USDC', 0) and included the hashed data into encodeAllMessages().

2. We call encodeAllMessages() and pass the data from requests to get the inputData, which we pass to submitData().

const request3 = await executor.callStatic.encodeAllMessages([idx, request2[0], request5[0]], [messages, request2[1], request5[1]]);
const inputData = request3[2];
await executor.submitData(inputData);

3. Finally, we call executeSpecificData() which will withdraw the funds from the strategies if needed and then we call executeDeposits()

await executor.executeSpecificData(id);
await executor.connect(admin).executeDeposits();

We call executor encodeLiquidityCommand(codeName, percent) to get ids and hashed messages. We can call it multiple times if we want to split the funds between different strategies. NB: the sum of percent should add up to 100 (10000 in the units passed to the function) Example: we want to invest 60% of funds to Frax/Usdc pool and 40% to Mim+3CRV.

πŸ“ˆ
❗
➑️
Assets and corresponding investment strategies