Getting started
Pay a run of supplier bills from a company treasury or its Safe, pay a single bill, record an existing loan, protect a loan, or write a bill and get paid in USDC or EURC.
What you need
- A plain wallet such as MetaMask or Rabby, or a Safe with a plain wallet as one of its owners. Other smart-contract wallets (ERC-4337 accounts, Circle's smart wallets) cannot pay through Adag, because Arc's batching acts as the wallet that signed the transaction, and such a wallet does not sign its own transactions; a Safe pays through its own path instead (Safe payments). A wallet upgraded under EIP-7702 works as long as it sends its own transaction (tested on a mainnet fork).
- Arc mainnet in that wallet: chain id
5042, RPChttps://rpc.mainnet.arc.io, explorerhttps://explorer.arc.io. Arc's gas token is USDC. - A little USDC for fees. A bitcoin-backed payment costs about 0.008 USDC in gas.
- To pay from bitcoin: cirBTC in your wallet. To pay from a balance: the bill's currency, USDC or EURC.
For a company treasury
The usual shape: a company holds bitcoin, owes several suppliers this week, and does not want to sell.
- Set up the paying account. An ordinary wallet the finance team controls, or the company's Safe, holding the cirBTC you are willing to pledge and a little USDC for fees. A Safe payment is proposed to the Safe's queue and executed once its owners approve it; the steps are on Safe payments.
- Collect the bills. Each supplier writes a bill on Adag with their own invoice number as the reference, and sends you its link. Suppliers need nothing but a wallet.
- Fill the basket. On Pay a bill, paste up to 10 bill numbers or links. Adag reads every bill from Arc and shows who it pays, how much and in which currency. Bills that are already paid, cancelled, unknown or written by your own wallet are set apart and not paid.
- Choose how each currency is paid. The bills are grouped by currency. For each group, pay from the wallet's USDC or EURC balance, or from a loan against its cirBTC. The loan shows the pledge and where the loan will sit against Adag's 40% line and Morpho's 86%.
- Sign once. One transaction pays every bill in the basket, each with its own invoice number in its own Memo. If any step fails, nothing moves. From a Safe, this is the proposal your owners approve.
- Check the result. Each bill turns Paid with a link to the payment on explorer.arc.io, and a supplier with the bill's page open sees it turn Paid within seconds. Your wallet lists the loan and the bills, and its export gives your accountant a CSV of every bill with its transaction link.
- Protect the loan and turn on alerts, if you want the loan watched from here on: see below.
If the paying account already borrowed on Morpho before it used Adag and that loan is above 40%, the first payment is refused, even from cash, until the loan is recorded: see Record an existing loan.
Pay a bill
For one bill, from a personal wallet or a company one:
- Open the link your supplier sent, or go to Pay a bill and type the bill number.
- Check the bill. Adag reads it straight from Arc and shows who it pays (the full, checksummed address), the amount and currency, the reference exactly as written, and whether it is still open. Nothing on this screen comes from the link except the bill number.
- Connect your wallet. If it is on another network, the app asks you to switch to Arc and builds nothing until you do.
- Choose how to pay.
- From your balance if you hold enough USDC or EURC. Two calls, approve and pay, in one signature.
- From bitcoin if you want to keep your stablecoins. The app shows the cirBTC it will pledge (what the contract asks for, plus a 5% margin), the loan it will take, and where your loan will sit against the 40% line and Morpho's 86%.
- The first time you borrow through Adag, read and accept Morpho's disclaimer.
- Sign once. The app shows each step as Arc confirms it.
- When the bill turns Paid, you get a link to the payment on the explorer. If the supplier has the bill's page open, it turns Paid on its own within seconds.
Pay several bills at once
Type up to ten bill numbers on Pay a bill, separated by commas or spaces, or paste the bill links. The basket shows every bill with who it pays and how much, and sets apart any that are already paid, cancelled, unknown or written by you. Those are not paid.
The rest are grouped by currency. For each group, choose your balance or a loan against your cirBTC; the loan shows the pledge and the loan-to-value it leaves. One signature then pays them all. If any step fails, nothing moves, and each bill still carries its own reference in its own Memo.
A basket link carries only the bill numbers, like /pay/basket?bills=12,13,14, so you can send it on.
Record an existing loan
If your wallet already borrowed against cirBTC on Morpho before it used Adag, Adag has never seen that loan, so it counts as new debt at your first payment. Above 40%, that payment is refused, even one paid from cash.
The bill page and the basket both say so, in a card headed "Record your existing loan first", with the button Record my existing loan: one signature, enrol(), no money moves. It records your position exactly as Morpho reports it. From the next block on, a payment from cash goes through, and borrowing more is checked against the 40% line as usual. As the card puts it: "Recording does not change your loan or make it safer: it tells Adag to judge only what you borrow from now on." A Safe gets Propose: record this Safe's existing loan, a Safe transaction of its own, and the payment can be proposed once it has executed. More on How it works.
Your loan afterwards
The loan is an ordinary Morpho loan in your own name. Interest accrues slowly, and if bitcoin falls far enough, Morpho can liquidate at 86%. Adag checks the 40% line at payment; after that, the loan guard watches it if you set one.
Your wallet shows each loan with its loan-to-value against Adag's 40% line and Morpho's 86% line, how far bitcoin can fall, and the live borrow rate. From there, each in one signature:
- Protect this loan: a trigger, a target, and an approval of exactly the USDC or EURC the guard may use, which is the most it can ever take. When the loan crosses the trigger, the guard repays only what brings it back to the target, from your own wallet. The steps and the limits are on The loan guard. Stop protecting clears the rule and sets the approval to 0 together.
- Add cirBTC to lower the loan-to-value. It adds no debt.
- Repay some to bring the loan down by an exact amount.
- Close loan to repay it in full and take all your cirBTC back. The page shows the amount to repay and whether your wallet holds enough; the approval it uses is reset to zero in the same signature. If the loan has a guard, the page adds "Closing also stops the loan guard for this loan: the rule is cleared and its approval set to 0." and does it in that same signature.
For Telegram messages when a loan gets close, and each time the guard repays, link a chat on Alerts: see Telegram alerts.
You can also do either on Morpho's own app: the USDC market or the EURC market. There, repay by your full share count, not by an amount, or a tiny remainder of debt blocks the withdrawal.
Write a bill
A bill is a record on Arc: who is paid (always the wallet that wrote it), the currency, the amount, an optional due date and a reference of up to 140 bytes, such as your invoice number.
- Open Write a bill and connect the wallet you want paid.
- Choose USDC or EURC, type the amount, pick a due date (or No due date) and add a reference. The counter shows the reference in bytes: accented letters and symbols take more than one, and the reference is public on Arc.
- The preview on the right is the bill exactly as the payer will see it, built from the same amount and bytes the transaction carries. Press Write the bill and sign once.
- The bill number appears with its link. Copy the link and send it to whoever owes it.
Writing a bill costs about 0.004 USDC in gas, and up to about 0.006 USDC with a full 140-byte reference. Your bills and their status are listed on Your wallet.
By hand, without this site: call createBill(currency, amount, due, ref) on AdagBills on explorer.arc.io, with the amount in base units (six decimals, so 125.50 USDC is 125500000), due as a Unix timestamp or 0, and the reference as hex bytes. The bill number is in the transaction's BillCreated event.
After it is paid
You receive the amount in USDC or EURC in the same transaction that marks the bill paid, and the contract checks your balance rose by exactly that amount. The payment carries your reference in its Memo.
Cancelling
While a bill is open, only you can cancel it, from the bill's page. A cancelled bill can never be paid. A paid bill cannot be cancelled.
How it works
One signature, five calls, the rule inside the contract that keeps every loan at or under 40%, recording an existing loan, and the guard that watches it afterwards.
The loan guard
AdagGuard repays part of your own loan from your own USDC or EURC when it crosses a trigger you choose, just enough to bring it back to your target.