DeFi pool
Start here
Import the pool module and you have balances, every op and the relay client. No build step, framework or backend.
import { makeConfidentialPoolUx } from './dapp/confidential-pool-ux.js';
import * as secp from '@noble/secp256k1';
import { keccak_256 as keccak256 } from '@noble/hashes/sha3';
import { sha256 } from '@noble/hashes/sha256';
const tacit = makeConfidentialPoolUx({ secp, keccak256, sha256, network: 'mainnet' });
const acct = tacit.account(walletPriv); // the Ethereum account that sends deposits
const me = tacit.identity(walletPriv); // { priv, pubHex, owner, secret }
const { notes, byAsset } = await tacit.balance(walletPriv);The key
The app derives one secp256k1 key from a fixed message the user signs once: identityMessage({ netName }) in identity-message.js, then prfBytesToScalar(sha256(signature)) with v folded to 27 or 28. The same wallet always gives the same key, so there is nothing to back up. tacit-address-kit.js does the derivation and the tacit1… address in one module with no dependencies.
Whoever has it controls the user’s funds, and every Tacit app asks for the same text. Never send, log or store it, and zero it once the key is derived.
Before your first op
- Balances are notes. Each holds an asset and an amount behind a commitment. Spending one publishes a nullifier, so it cannot be spent twice. Every op except a deposit is one
settle()with a proof. - Amounts are 8-decimal units, not wei. ETH, TAC, cBTC and cUSD scale by
1e10; an amount must divide exactly. - Everything comes back from the key.
tacit.recover({ walletPriv })finds notes, farm and loan positions from chain data. A position opened under a key you generated yourself, not one derived from the wallet key, must be saved before you submit it. - One key per process, and rescan before a spend so every input comes from the same scan.
- A good first loop: shield, send to yourself, withdraw. That covers a deposit, a proof, a spend and an exit.
DeFi pool
The app in code
Each tab of the tacit.finance tile is a few SDK calls. Relayed ops need no ETH: the relay fee comes out of the op.
| Tab | SDK calls | How it lands |
|---|---|---|
| Shield | wrap then submitWrapSettle, or wrapAndSend | Your deposit, then a relayed proof |
| Swap | quoteRoute, route | Relayed |
| Send | stealthSend to someone, transfer to yourself | Relayed |
| Earn | lpBond, farmHarvest, farmUnbond, farmRedeem | lpBond from your account, the rest relayed |
| Withdraw | unwrap, sendUnwrap | Relayed |
| Bridge | bridgeBurnToPool then bridgeMint; crossOut; fastlaneExit | A Bitcoin transaction and a relayed settle |
| Borrow | mintCbtc, defiActions(walletPriv).openCdp; TAC vaults via TacVaultRouter | Relayed, or one transaction |
DeFi pool
Shield, send, withdraw
// Shield: a plain deposit, then one relayed proof once it is mined
const w = await tacit.wrap({ walletPriv, amountWei: 10n ** 16n, ticker: 'cETH' }); // tETH in the app
await tacit.submitWrapSettle({ built: w });
// Send: to yourself (split or merge), or to someone's tacit1… address
const fee = await tacit.quoteTransferFee(5_000_000n, 'cETH');
await tacit.transfer({ walletPriv, notes, recipientPubHex: me.pubHex, amount: 5_000_000n, fee });
await tacit.stealthSend({ walletPriv, notes, recipientPubHex, amount: 5_000_000n });
// Withdraw
await tacit.unwrap({ note: notes[0], walletPriv, recipient: '0x…' });- Keep the wrap index. If the proof step fails,
buildWrapwith the same index rebuilds the same deposit. A deposit never expires; wrapping again would deposit twice. - Paying someone locks to a one-time key from their
tacit1…address, and they claim it. The sender can refund after about 90 days. A.weior.ethname can carry the address in itsfinance.tacittext record (confidential-names.js). - Withdrawing.
unwrappays a whole note out;sendUnwrappays an exact amount and keeps the change private. The pool has nowithdraw(): a plain call or transfer to it reverts. Confirm by the recipient’s balance. - Straight to Base or Robinhood Chain.
ConfidentialRouter.exitAndExecutewithdraws into the L2 bridge in one transaction (about 2,000,000 gas).
DeFi pool
Swap and earn
Each asset pair and fee tier is one pool with public reserves. A trade reaches them privately, as notes and a proof, or in public through TacitPublicAmm with no proof. Both move the same reserves, so liquidity is never split, and a swap’s fee stays in the reserves for the LPs.
const path = [{ assetNext: assetB, feeBps: 30 }];
const fee = await tacit.quoteOpFee(tacit.poolTickerOf(assetA), 'route'); // the relay fee, in the input asset
const q = await tacit.quoteRoute({ asset0: assetA, amountIn, path, fee }); // null if a pool on the path is not founded
await tacit.route({ walletPriv, inNote, amountIn, path, fee, minOut: q.amountOut * 995n / 1000n });
// Earn: add liquidity and bond it to a farm in one settle
await tacit.lpBond({ walletPriv, controller: tacit.cfg.farm.manager, aNote, bNote, feeBps: 30, selfRelay: true });
const [pos] = await tacit.farmPositions({ walletPriv });
await tacit.farmHarvest({ walletPriv, position: pos }); // before unbonding
await tacit.farmUnbond({ walletPriv, position: pos });- Any amount. A route spends
amountInfrom one note, through up to four pools in one settle; the rest of the note comes back as change in the same proof. - A private swap clears at the reserves it was proved against. If another trade lands first, it is refused, nothing is spent, and you quote again.
- Finding a pool. There is no registry: compute
tacit.routePoolId(a, b, feeBps)and readpools(poolId). The app checks the 30, 5, 100 and 1 bps tiers. - Founding a pool is sent from your own account (
lpAddwithselfRelay: true), and sets the price. - Farms pay wTAC, which redeems one for one for TAC (
farmRedeem). Read the live pools, weights and rate fromGET /farm/program: they change, so don’t hardcode them. Harvest before you unbond; unbonding forfeits what was not harvested. - Aggregators use
TacitPublicAmm.quoteSwapandswapPublic, orConfidentialRouter’s permit and Permit2 entry points. Amounts must be multiples of1e10.
DeFi pool
Bridge to Bitcoin and back
TAC, tETH, cBTC, cUSD and USDT cross the same way; only the asset id differs. No signer holds anything: each side proves the other’s state. A Bitcoin block counts once it is 24 blocks deep, about four hours, so say so in your interface.
Bitcoin to Ethereum
// deriveBridgeMintBlinding: bridge-mint-recovery.js, so the minted note comes back from the key
const b = await tacit.bridgeBurnToPool({ prims, note, notePriv, fee: 0n, dest: { owner },
deriveDestBlinding: (nu) => deriveBridgeMintBlinding({ privkey: walletPriv, nullifier: nu }),
isSpendable: (u) => isPlainSats(u) });
// once the burn is 24 blocks deep
await tacit.bridgeMint.bridgeMint({ ...b.mintArgs, recovery });- A mint at fee 0 is relayed free, so a holder with no ETH can finish.
- Check the note first:
GET /reflection/note-witness?leaf=finds it if it can bridge.
Ethereum to Bitcoin
const r = await tacit.crossOut({ walletPriv, notes, amount, destOwner, destChain: 1 });
await broadcast.completeCrossOutOnBitcoin({ ...r, ...r.crossOuts[0], block: r.ethBlock }); // crossout-broadcast.js- The notes must sum to exactly
amount + fee;destOwneris the recipient’s x-only Taproot key. - Broadcast only after
GET /reflection/eth-state/coverssays the burn’s block is covered, built from the claim id the pool emitted.completeCrossOutOnBitcoindoes both checks. - Output 0 must pay
destOwneras P2TR.GET /crossout/mintedconfirms the credit.
The fast lane
A Bitcoin note bound to this pool can be spent on Ethereum directly, with no burn and mint: tacit.fastlaneExit. The spend is recorded, so the note cannot also be spent on Bitcoin. buildTacMigration (burn-deposit-bitcoin.js) binds a TAC note in one Bitcoin transaction.
DeFi pool
Borrow without selling
cBTC and cUSD, against Bitcoin
- Lock BTC in a self-custody output carrying the lock envelope (
cbtc-lock.js). Pick the funding input first: the note’s blinding derives from it. - Escrow wstETH worth 1.5 times the lock through
CbtcEscrowHelper.postEscrowWithETH(outpoint). - Mint cBTC once the lock is 24 blocks deep:
tacit.mintCbtc({ walletPriv, outpoint, vBtc, blinding }), relayed and free. - Borrow cUSD with
tacit.defiActions(walletPriv).openCdp: 150% collateral to mint, liquidation below 130%. Mint at fee 0. Derive the position’s keys from the wallet key asbtc-borrow.jsdoes, sorecoverfinds the loan.
TACD and TACE, against TAC
Two vaults take TAC as collateral: one lends TACD, a dollar, the other TACE, an ether. TacVaultRouter moves TAC in with a permit and borrows in one transaction. Read a vault with totalDebt(), debtCeiling() and vaults(owner). The app is tacit.finance/vault.
Pay pool
Private payments, proved on device
A smaller pool with one fixed circuit, for holding and paying privately. One transaction can shield, pay someone with change, withdraw and pay a relayer. The user’s device makes every proof, so nothing private leaves it. Its trusted setup closed after 176 public contributions. It runs tacit.finance/pay/eth and the front page’s “Pay anyone”.
- Drop-in wallet.
https://tacit.finance/evm-pool/tacit-evm-pool-wallet.jsis the whole wallet as one ES module with no imports: keys, scanning, proving and sending. It is served withAccess-Control-Allow-Origin: *and checks the proving files against pinned hashes. - Same addresses on every chain: pool
0x000000c2A20657CE25f2Ba99737933D031AFBEE9, router0x0000006C96Afa6f1cD4DF8FE19bc0d8B6A6Cd7B5, token zap0x0000008EbBF2323f95c4fBc18254f3D65C53998c. MegaETH has the pool and router too (no zap), and the drop-in wallet works there. - Fast first load. An on-chain checkpoint registry lets a new wallet start from a recent tree instead of the deploy block, then read older history in the background.
- Relayers send a withdraw for a fee in the pool’s own asset, so a withdrawal needs no gas.
EVM-POOL.md has the token pools, keepers, deposit addresses and payment links.
Everything else
Proving and the API
Every DeFi-pool op except a deposit needs a proof. You choose who makes it and who sends it:
- Hosted, the default. The relay proves and sends
settle(), paid from the op. - Proof only.
selfRelay: trueon an SDK call takes the proof and sendssettle()from your account. - Your own prover.
self-prover.jswith your own Succinct account: the op goes to the prover network, not the relay’s queue. A page uploads it through the API’s/prover/upload, which forwards the bytes and keeps nothing.
Anyone with a GPU can prove for others and earn TAC at tacit.finance/prove. A wallet with no ETH can pay gas in TAC: it signs one order and TacitGasRelay runs it (gas-relay.js).
What the relay sees: the op you hand it, never your key or a note’s blinding. It can prove that op or decline it; it cannot redirect an output or raise the fee.
| Endpoint | What it does |
|---|---|
POST /confidential/submit | { type, op, memos, mode? } → { jobId } |
GET /confidential/status?id= | pending → proving → settled (a prove-only job stops at proven), or failed |
GET /confidential/quote?asset= | The relay fee floor; quote with tacit.quoteOpFee |
GET /confidential/relay | Whether the relay is up and proving |
GET /confidential/index | The pool’s events behind one cursor, for recovery without a scanner |
GET /reflection/status | The Bitcoin height the pool has attested |
GET /farm/program | Farm pools, weights and rates, read from chain |
POST /gas/order | Post a signed pay-gas-in-TAC order |
Submits are rate-limited per IP. Ops with no fee (a deposit’s proof, a cBTC mint, a zero-fee bridge mint) share a free daily budget; past it, add a fee.
Everything else
List TAC
For a DEX, aggregator, lending market, wallet or market-data site. TAC was etched once on Bitcoin, 21,000,000 with no mint authority. On Ethereum it is an ERC-20 at 0xA1313eb9f3A445606D9583bcAc3ebeB56a858279 that only the pool can mint, and only against TAC from Bitcoin. Verify TAC checks all of it in your browser.
| Read | Returns |
|---|---|
MINTER() | 0x000000000Ed1eabD231Be41d93b719056F7febFC, the pool |
ASSET_ID() | 0xf0bbe868af10c6c67652a99709bf32048d1aa7194efe3e9a1ef1bde43f94762b |
symbol(), decimals() | TAC, 18 |
contractURI() | EIP-7572 metadata; logo at /brand/logo.svg |
- Show a maximum supply of 21,000,000.
totalSupply()is only the part public on Ethereum. - A plain ERC-20: no fee on transfer, rebasing, pause, blacklist or owner. EIP-2612
permit(nameTacit Token, version1), and Permit2 needs no approval. - Where it trades: the Precision TAC/ETH pool, and the pool’s 30 bps tier through
TacitPublicAmm. evm-trade-venues.js has quotes and calldata for both. A spot price is not an oracle. - List TAC, not wTAC. wTAC only carries farm rewards.
- The airdrop claims until 2026-12-20 at tacit.finance/rewards;
tacit.tacAirdrop.status(address)checks one address.
Everything else
Reference
ContractsEthereum mainnet
| Contract | Address |
|---|---|
| ConfidentialPool | 0x000000000Ed1eabD231Be41d93b719056F7febFC |
| ConfidentialRouter | 0x000000005dA3E3B73726af3c774Deeb9472D4992 |
| TacitPublicAmm | 0x00000000E36C7EC997CC59DCda9E03673B448119 |
| CollateralEngine | 0x000000003f608BDdF0ca45934003ffb9DbDF70DB |
| CbtcEscrowHelper | 0x000000008eCD09f922C9FbbDD9ACA5aE8F0beBfA |
| FarmManager | 0x000031C47Cb61faB1CE2790a69625FABB71EDE24 |
| WrapTipForwarder | 0x000000D218B03db5837943b0b05DeA2965AE956e |
| TacVault (TACD) | 0x00000087ac9ed3E1Bd443E00FBe18B4EdcAEeb1F |
| TacVault (TACE) | 0x00000047bFC8cF504967049D9Cf9E1FD9651ED80 |
| TacVaultRouter | 0x000000F9ab49650502BeC910D13b4717F0082598 |
| TacitGasRelay | 0x000000197E8f0B64463B2010e568fF42090Af88d |
| TacAirdrop | 0x4b4cb98D0C836c2783Ac46f0078b904dab533AE8 |
| TacitBlocks (Tacit chain) | 0x00000000000A9147fFd8d41D152d730cA5F84E6c |
| TacitSeats (Tacit chain) | 0x00000000001F703eAE70De3B528213E4802790Fb |
| Bitcoin header relay | 0x20A6ddc2C6E620c6248B5A34E85996516FDd19D0 |
| SP1 verifier (Groth16) | 0xb69f2584CBcFf99a58C4e7002E8b89Af54a6f4e2 |
| Ops multisig | 0x006CD14F36F65eCbB29b2519cCBe63A0DC8549F2 |
| Program vkey (settle) | 0x006cd47fd23937a6d247696cace28c22d2c6a8280447e6ac45a3571de232d6e3 |
The full list, with deploy blocks, is in DEPLOYMENTS.md. The Tacit chain’s wallet module is dapp/tacit-chain-client.js and its spec is TACIT-BLOCKS.md.
Assetspool ids and public ERC-20s
| Asset | Pool asset id | Public ERC-20 |
|---|---|---|
| TAC | 0xf0bbe868af10c6c67652a99709bf32048d1aa7194efe3e9a1ef1bde43f94762b | TAC 0xA1313eb9f3A445606D9583bcAc3ebeB56a858279 |
| tETH | 0x3cba71e1114af183cdeacc6b8457a474d17529fd28704480ca799d0d03126f34 | native ETH |
| cBTC | 0x62a20d98fc1cd20289621d1315294cb8772f934d822e404b71e1f471cf0679c8 | tacBTC 0xdf1d99148bEb7a9AFf1d95C49B3d22b7ed90D696 |
| cUSD | 0x8f4490dd3728b0ee904d7a67c11b37ffd463a5c7f08b79810006995ee8a9679d | tacUSD 0x23cACFFAc2674514A6d4F6cD420B4cc2aC921564 |
| wTAC | 0x1097c9e552ae4fce2a8c416b93403953fa445a5f2cdae8ced36d9a78cfe40832 | 0x2018139a8FDd3666855BE3315C7683b4D6aB7AEf |
| TACD | 0x9cb6a17c0a61a40fa936296e9ec2b428e2a3b7c70cdb76ed25c6937124a3cc11 | 0xA0f6B02561C8ef08335B69aD25e022C0B342147C |
| TACE | 0xda4acdbe7c276dd82c39c3fd470aa1d18d562504b678cfa5a8144c8afddd5db4 | 0x9DE27883C5Dc9Db47BE12E595D59b8f1aBEC8570 |
Resolve a pool-minted token with canonicalTokenFor(assetId) rather than caching it. TAC, tETH, cBTC and cUSD are also listed by pool asset id on the token.list.wei registry (0x0000006013dF75A31678B786061C2B54bf531524): a listing whose standard is Tacit is a pool asset, not an ERC-20.
Errorswhat a revert means
| Error | What it means |
|---|---|
AmountNotAligned | Not a multiple of the asset’s unitScale. |
DepositExists | That wrap index is taken; use the next one. |
DepositNotPending | The deposit is not mined yet, or already used. |
UnknownRoot | The scan is incomplete or from another pool. Rescan. |
NullifierAlreadySpent | An input note is already spent. |
MemoLeafMismatch | Memos don’t match the new notes in count or order. An empty memo is 0x. |
ProofInvalid | The proof was made for another program. |
PoolNotInit | A first liquidity add was relayed; found the pool from your account. |
CbtcLockMismatch | The lock is already minted or spent, or its escrow is short. |
SlippageExceeded | A public swap paid less than its minimum. |
ConsumedCountStale | A bridge spend landed after the proof was built; rebuild it. |
Verify it yourselfnothing hosted is trusted
A proof verifies against the pool’s immutable program key or the settle reverts, so nothing Tacit hosts decides what is valid. The pool has no proxy, upgrade, pause or key over funds. You can prove with your own account, rebuild the index from the pool’s logs, and replay the Bitcoin fold from public blocks. To check TAC’s fixed supply with nothing installed:
curl -fsSL https://raw.githubusercontent.com/src-company/tacit/main/scripts/verify-tac-supply-standalone.mjs | node --input-type=module