尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证DeFi BTC maxi aggregator
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗🇬🇧 English · 🇩🇪 Deutsch
DeFi BTC maxi aggregator: Stack Bitcoin. Automatically.
Users deposit USDC or ETH. The principal stays where it is – only the interest is turned into Bitcoin (cbBTC) automatically and can be claimed at any time. Runs on Base.
⚠️ Beta, not externally audited. Do not use with money you cannot afford to lose.
User ──USDC/ETH──▶ BtcYieldVault ──▶ AaveV3Strategy ──▶ Aave V3 (interest)
│
Keeper ──harvest()──▶ OracleUniswapSwapper ──▶ Uniswap V3 ──▶ cbBTC
│ ▲
│ Chainlink price as floor
▼
claim() ──cbBTC──▶ User
An optional vault for people who knowingly take risk: ETH is deposited, the vault provides concentrated WETH/cbBTC liquidity on Uniswap V3 (range ±8 %), and the trading fees are paid out as cbBTC. The deposit is not protected – when ETH and BTC move apart, the position ends up holding more of the weaker coin (impermanent loss); withdrawing makes the loss final. Fork test: ETH −15 % vs BTC → 6.2 % less than holding half/half.
contracts/script/deploy-turbo-mainnet.ps1 (limits 0.5 ETH total / 0.2 ETH per address)| Role | Who | Can |
|---|---|---|
| Admin | TimelockController (2-day delay), controlled by the multisig | change strategy, swapper, fees, limits |
| Guardian | Multisig | pause immediately, pull funds out of the strategy |
| Keeper | Bot wallet | only harvest() – swap floor enforced by Chainlink |
Withdrawing and claiming always work, even while paused. The deployer keeps no rights after deployment (checked by the deploy script).
contracts/ Foundry: smart contracts, tests, deploy script
src/BtcYieldVault.sol Vault ("interest becomes BTC")
src/swappers/OracleUniswapSwapper.sol Uniswap swap with Chainlink floor
src/strategies/AaveV3Strategy.sol Aave V3 lending
src/TurboVault.sol HIGH RISK: Uniswap V3 WETH/cbBTC liquidity, fees paid as cbBTC
src/YieldVault.sol ERC-4626 vault (base for a future pure BTC vault)
script/Deploy.s.sol Deployment incl. timelock, roles, limits
web/ Next.js frontend with hamster UI, passkey login (Base Account), English + German
keeper/ Harvest bot (Node + viem), runs daily via GitHub Actions
Requirements: Foundry, Node.js 20+, Git.
git clone --recursive https://github.com/gabbergandalfderreiche/hamstr.git
cd hamstr/contracts
forge test # unit tests + tests against a copy of Base mainnet
# terminal 1
anvil --fork-url https://mainnet.base.org --chain-id 31337
# terminal 2
cd contracts && bash script/local-fork.sh # deploys + 20,000 test USDC
cd ../web && npm install && npm run sync-contracts
cp .env.example .env.local # set NEXT_PUBLIC_NETWORK=fork
npm run dev # http://localhost:3000/app → "Test wallet (local)"
# move time forward + harvest like the keeper
cd contracts && HOURS=12 bash script/local-harvest.sh
The local scripts use anvil's public test keys. Never use these addresses on a real network – on Base mainnet they carry EIP-7702 "sweeper" delegations that steal incoming ETH.
cd contracts
MULTISIG=0x... KEEPER=0x... TREASURY=0x... \
forge script script/Deploy.s.sol --rpc-url https://mainnet.base.org --broadcast --account <keystore>
cd ../web && npm run sync-contracts
Beta defaults (override via environment variables): 2-day timelock, 50,000 USDC / 5,000 USDC per person, 15 ETH / 1.5 ETH per person, 10 % performance fee, max. 1 % deviation from Chainlink, Chainlink prices at most 1 h old (ETH, cbBTC) or 25 h (USDC).
keeper/src/keeper.mjs harvests both vaults, but only when it pays off:
minHarvestharvest() first – stale prices, a deficit or a missing role cost no gasRuns daily via GitHub Actions. Add BASE_RPC_URL and KEEPER_PRIVATE_KEY under Settings → Secrets → Actions and fund the keeper wallet with ~0.005 ETH on Base. Until the mainnet deployment the job simply exits. Real problems (stale oracle, deficit, missing role, low gas balance) fail the run → GitHub sends an e-mail.
Note: GitHub pauses scheduled workflows in public repos after 60 days without commits – re-enable it under Actions.
# test locally against the fork (anvil gas prices are ~170x higher than Base, so lower the threshold)
cd contracts && HOURS=24 SKIP_HARVEST=1 bash script/local-harvest.sh
cd .. && RPC_URL=http://127.0.0.1:8545 DEPLOYMENT=contracts/deployments/31337.json \
KEEPER_PRIVATE_KEY=<anvil #0> MIN_PROFIT_MULTIPLE=0.05 node keeper/src/keeper.mjs
The website is available in English and German (/en/..., /de/...). Visitors without a language in the URL are redirected based on their browser language; the DE | EN switcher remembers the choice in a cookie. All texts live in web/src/i18n – en.ts is type-checked against de.ts, so a missing translation fails the build.
MIT