CaviarNine - The Future of DeFi
  • Welcome to CaviarNine
  • introduction
    • Overview
    • Vision & Mission
    • Team
    • FAQ
    • DISCLAIMER
    • Terms and Conditions
  • audits
    • Order Book
    • Shape Liquidity
    • LSU Pool
  • Tokens
    • Overview
    • FLOOP
    • CAVIAR
    • RADIT
  • Products (FLOOP)
    • Aggregator
      • Aggregator Fees
      • Anthic-Intent
    • Order Book
      • Overview
      • Placing a Limit Order
      • Order Management
      • Order Book Fees
      • Manifests
    • Shape Liquidity
      • Overview
      • Bins
      • Pools
      • Adding Liquidity
      • Your Liquidity
      • Removing Liquidity
      • Understanding Active APY
      • How to Create a Pool
      • Starting Mid Price
      • Shape Liquidity Fees
    • LSU Pool
      • FAQs
      • Liquid Staking on Radix
      • LSU Pool Overview
      • Move Stake and Instant Unstake
      • Adding Liquidity
      • Removing Liquidity
      • Credit Receipt
      • Manifests
      • LSU Pool Fees
    • Simple Pools
      • Overview
      • Create a Pool
    • FEES
  • PRODUCTS (CAVIAR)
    • HyperStake
  • Ecosystem
    • CAVIAR Airdrop
    • Radix Ignition
    • Token Bridge
    • Fee Vaults
  • Instant XRD Unstaking
    • Overview
  • API
    • CoinMarketCap
    • CoinGecko
    • Public
  • Tools
    • iFrame Trading Widget
Powered by GitBook
On this page
  • We have a dedicated page to taking advantage of fees:
  • Component Addresses
  • Useful Component Arbitrage Methods
  • get_swap_vault_amount
  • get_swap_price
  • swap
  • Handy Api Endpoint
  1. Ecosystem

Fee Vaults

Are components where the protocol fees are collected from the FLOOP and (future) CAVIAR product ecosystems

PreviousToken BridgeNextOverview

Last updated 6 months ago

We have a dedicated page to taking advantage of fees:

Component Addresses

The FLOOP Ecosystem has 2 component vaults:

component_rdx1cqvfnpl0ld49rhwyhu4v3r05962yeplmasggtzlu9r2dmh7amx6vpn
component_rdx1crmhkatyjrw0070nsusdm4adwr5s3eaysmevxlvaxx6fspxkwdhlua

The CAVIAR Ecosystem has no fee vaults set up yet as no products have been launched.

<coming soon>

Useful Component Arbitrage Methods

There are three methods anyone can call to get some useful information about arbitrage opportunities:

get_swap_vault_amount

This method returns the amount of TOKENS of a specific RESOURCE_ADDRESS that are available when swapped for FLOOP. This amount increases over time as protocol fees are collected from the , , and the . manifest:

CALL_METHOD 
    Address("{COMPONENT_ADDRESS_FEE_VAULTS}") 
    "get_swap_vault_amount"
    Address("{RESOURCE_ADDRESS}");

get_swap_price

This method tells you how much FLOOP you need to send for a given RESOURCE_ADDRESS to receive the amount of TOKENS from the RESOURCE_ADDRESS vault, (returned from the get_swap_vault_amount above). This amount of FLOOP decreases over time, encouraging users to empty the fee vaults. manifest:

CALL_METHOD
    Address("{COMPONENT_ADDRESS_FEE_VAULT}") 
    "get_swap_price"
    Address("{RESOURCE_ADDRESS}");

swap

Finally if you want to send the amount of FLOOP (calculated from get_swap_price) for the amount of TOKENS (calculated from get_swap_price) for RESOURCE_ADDRESS then you want to do a swap! manifest:

CALL_METHOD 
    Address("{YOUR_ACCOUNT_ADDRESS}") 
    "withdraw" 
    Address("resource_rdx1t5pyvlaas0ljxy0wytm5gvyamyv896m69njqdmm2stukr3xexc2up9")
    Decimal("{AMOUNT_OF_FLOOP}");
        
TAKE_FROM_WORKTOP
    Address("resource_rdx1t5pyvlaas0ljxy0wytm5gvyamyv896m69njqdmm2stukr3xexc2up9") 
    Decimal("{AMOUNT_OF_FLOOP}")
    Bucket("my_bucket_of_floop");

CALL_METHOD
    Address("{COMPONENT_ADDRESS_FEE_VAULT}")
    "swap"
    Bucket("my_bucket_of_floop")
    Address("{RESOURCE_ADDRESS}");
        
CALL_METHOD 
    Address("{YOUR_ACCOUNT_ADDRESS}")
    "deposit_batch" 
    Expression("ENTIRE_WORKTOP");

Handy Api Endpoint

To make things a little simpler, we've added an API endpoint where you can see all the resource vaults, their values and the redemptions amounts (FLOOP or CAVIAR) here:

https://api-core.caviarnine.com/v1.0/fee_vaults

Currently this endpoint is in real time (and we'd like to leave it like that) but if it get's abused we'll cache it every X minutes which would be a shame.

https://www.caviarnine.com/fee-vaults
Aggregator
LSU Pool
Shape Liquidity
Order Book