Integrations
Third-Party Integrations
This guide is aimed at front-end and smart-contract developers that want to add rovBTC support to their dApps, dashboards or automated strategies.
All code samples use the Botanix test-net RPC and the ethers v6 library, but the same concepts apply to other stacks.
1. Discover the contracts
rovBTC (ERC-4626)
0x9BC574a6f1170e90D80826D86a6126d59198A3Ef
IRovBTC
pBTC (ERC-20)
0x0D2437F93Fed6EA64Ef01cCde385FB1263910C56
IPBTC
stBTC (ERC-20)
0xF4586028FFdA7Eca636864F80f8a3f2589E33795
ISTBTC
Replace the placeholders with the network-specific addresses published by the Rover team.
export const ROV_BTC = "0x…";
export const P_BTC = "0x…";
export const ST_BTC = "0x…";2. Reading data (balance, TVL, previews)
import { Contract, JsonRpcProvider, parseUnits, formatUnits } from "ethers";
import { ROV_BTC } from "./const";
import rovBTCAbi from "./abi/rovBTC.json";
const provider = new JsonRpcProvider("https://testnet.botanix.io");
const rovBTC = new Contract(ROV_BTC, rovBTCAbi, provider);
export async function getUserInfo(user: string) {
const [shares, previewRedeem] = await Promise.all([
rovBTC.balanceOf(user),
rovBTC.previewRedeem(parseUnits("1", 18)) // 1 rovBTC → pBTC
]);
const tvl = await rovBTC.totalAssets();
return {
shares: formatUnits(shares, 18),
oneShareWorth: formatUnits(previewRedeem, 18),
tvl: formatUnits(tvl, 18)
};
}The same helpers (
previewDeposit,previewWithdraw,calculateTVL) are available and gas-cheap because they areviewfunctions.
3. Staking from your UI (front-end)
3.1 Deposit native BTC
3.2 Deposit pBTC
3.3 Deposit stBTC
From your component you can call any of the above helpers depending on the asset type detected in the user's wallet.
4. Programmatic deposits (scripts & bots)
Below is a TypeScript Hardhat script that periodically moves idle pBTC from a treasury address into the vault.
5. On-chain integrations (Solidity)
Your contract can stake treasury assets or build strategies on top of rovBTC. Import the minimal interface and interact just like any ERC-4626.
Because rovBTC follows the ERC-4626 token standard you can plug it into any yield aggregator that supports the interface without additional wrappers.
6. Test-net faucet
Need pBTC or stBTC to test your integration? Use the public faucet:
Visit
https://faucet.botanix.io.Claim test BTC, swap it for pBTC at
https://swap.botanix.io.Stake pBTC into stBTC at
https://stake.botanix.io(optional).
7. Support
For technical questions join our Discord or open a GitHub discussion.
Last updated