尚未偵測到更新。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