π±Baults
Bault API
Get a list of all the Baults, their TVL and APY here:
https://backend.kodiak.finance/baults
Bault Compounding Guide
This guide explains how compounding works in Baults, including the BGT auction mechanism, optimal usage patterns, and integration with the BountyHelper contract which is designed to make compounding free and effectively available for anyone to call.
How Compounding Works
Baults are ERC4626-compliant vaults that stake tokens in reward vaults to earn BGT rewards. Over time, these BGT rewards accumulate but remain unclaimed in the reward vault. Compounding is the process of claiming these BGT rewards and either:
Receiving them directly as BGT tokens
Converting them to wrapped BGT tokens (like iBGT, yBGT, LBGT etc.)
The Bounty Mechanism
Baults use a bounty-based auction system that:
Allows anyone to trigger the compounding process
Requires the caller to provide the configured "bounty" in bault asset (the staking tokens)
Gives the caller all the accumulated BGT rewards as either BGT or wrappedBGT of choice.
How the Bounty System Works
The caller pays a fixed amount of staking tokens (the bounty)
A small portion of the bounty (set by
compoundFeeBps) goes to the protocol treasuryThe rest of the bounty is staked in the reward vault, benefiting all vault users effectively increasing the share price for each user.
The caller receives all accumulated BGT rewards or a wrapped version
This creates a market-driven incentive for compounding - when the value of unclaimed BGT exceeds the bounty cost, someone will claim it.
This is a significant improvement over traditional compounding methods where the rewards are claimed and swapped for the asset, which can lead to slippage and loss of value while compounding. Additionally the swap system requires gatekeeping the compounding process and integration of swap routers for effective and secured compounding which limits the flexibility and accessibility of the compounding process. The bounty system allows anyone to compound and benefit from the compounding process while also giving the bault users maximal compounding value.
Cost-Effective Compounding
With the introduction of the bounty system, you can benefit from the compounding process and claim the rewards. To compound cost-effectively:
Monitor BGT accrual: Wait until enough BGT has accumulated to justify the bounty cost
Calculate break-even point: Compare the value of claimable BGT against the bounty cost
Choose the right wrapper: Different wrappers have different valuations for BGT and are generally a better choice against BGT itself. So find the best wrapper that maximizes the value of the BGT rewards.
Executing Claims: Once the breakeven point has been reached, execute the claim transaction to receive the rewards as soon as possible to benefit from any excess rewards that accumulate.
Remember you are racing against other bots for the bounty, so act quickly while keeping a minimal profit margin to claim the rewards before someone else does.
Previewing Potential Claims
Before executing a compound transaction, you can preview the expected outcome:
Performing Compounding
Always correctly set the minAmountOut after previewing to ensure you do not get frontrun.
Direct BGT Claim
Wrapped BGT Claim (iBGT, LBGT, yBGT)
BountyHelper: Zero-Capital Compounding (Recommended)
The BountyHelper is a specialized contract that enables anyone to compound Baults without needing the bounty payment upfront. It uses a clever mechanism to make compounding easy and accessible for everyone without need of the bounty.
How BountyHelper Works
Pre-funding mechanism: The helper maintains a balance of staking tokens that can be used for bounties
Swap integration: When using bounty helper, the claimed wrappers must be swapped for the staking token to return the bounty amount back to the contract. You can use any contract that can swap/exchange the bgtWrapper for the underlying staking token. We recommend using the Enso Router for swapping directly from the liquid wrapper to the underlying staking token.
Refund system: Returns any excess tokens to the caller after returning the free bounty amount accessed by the compounder and additionally rewards the compounder by transferring any amount of remaining staking token/bgt wrapper back to the user.
Compounding Algorithm Overview using the BountyHelper
The compounding process follows these key steps:
Discovery: Find baults that are ready to compound
Wrapper Selection: Determine the best BGT wrapper (iBGT, YBGT, LBGT) for maximum value
Quote Generation: Get swap quote to convert wrapper to underlying staking token
Profitability Check: Ensure the swap output covers the required bounty
Execution: Send the compound transaction via BountyHelper
Step 1: Check if Bault is Ready to Compound
Step 2: Check Profitability
Step 3: Execute Compound Transaction
Key Points
What You Need
A wallet with some BERA for gas
Access to a swap router (Enso recommended).
Get your enso api key here (https://shortcuts.enso.finance/developers)
Look at how to use the api here (https://docs.enso.build/api-reference/defi-shortcuts/optimal-route-between-two-tokens)
RPC endpoint for Berachain (https://rpc.kodiak.finance)
How You Profit
You earn the excess bounty (mostly in staking tokens) for each successful compound
No upfront capital required - BountyHelper funds the bounty
Profit =
stakingTokenSwapOutput - baultBounty
BGT Wrappers
Choose the best wrapper for maximum value:
iBGT: Infrared liquid staking token
YBGT: Yeet liquid staking token
LBGT: Another liquid staking option
When to Compound
stakingTokenSwapOutput >= baultBounty(profitable)Gas costs(generally dust) < expected profit
This simple flow shows how anyone can participate in bault compounding and earn rewards by helping optimize DeFi yields!
Last updated