Fees & waterfall
Which fees the contract can charge, what is charged today, how a fee moves through a lien, and how the liquidation waterfall pays out.
The contract can charge two fees: a usage fee added to each charge drawn through a lien, and a penalty when a defaulted lien is liquidated. The usage fee is added to the debt and collected in the debt token when the lien is repaid. The penalty is paid out of liquidation proceeds. For an ERC-20 lien that happens in the collateral token, in kind. Only repay, payInstallment and liquidateAsset move the debt token. The usage fee is 0% unless the admin sets one, so by default only the penalty applies.
The protocol fee
Three rates shape the economics of a lien. All are set in basis points (1 bps = 0.01%). The contract has no default for any of them: the admin sets them at deployment. The 2% and 1% figures below come from the reference deployment script (src/deploy.ts). The usage fee is collected in the debt token. The penalty and the keeper reward are paid in the collateral token for an ERC-20 lien, and in the debt token for a title lease.
| Fee | Charged when | How much | Paid to |
|---|---|---|---|
Usage feeusageFeeBps | On every charge | A slice of each charge. 0% unless the admin sets one | Treasury |
Liquidation penaltyprotocolFeeBps | Only when a defaulted lien is liquidated | A percentage of the debt, paid from what remains after the keeper and the creditor. Charged to the owner, not the creditor | Treasury |
Keeper rewardkeeperRewardBps | Only when a defaulted lien is liquidated | A percentage of the debt. Paid first, ahead of everyone | Whoever liquidates |
src/deploy.ts) passes no usage fee, so the SDK default of 0 applies and no usage fee is added or collected unless the admin sets one. The local demo chain, which uses test tokens, runs 0.5% so the accounting path can be exercised. No public deployment exists yet, and no public rate has been decided. Any figure on this page is a ceiling or a reference script value, not revenue.How the usage fee works
When a creditor records a charge, the contract adds the fee on top and tracks it separately, so it can always tell the creditor's money from the protocol's.
fee = amount * usageFeeBps / 10000
debt += amount + fee // the fee counts against creditLimit
protocolAccrued += feeWhen the rate is above zero, the fee accrues on every charge. It is collected when the owner repays, or from liquidation proceeds if value remains after the keeper and the creditor are paid. If collateral is under water, the protocol can receive nothing. At 0% no fee is added and protocolAccrued stays at zero.
Who can change the rates
- The admin sets all three rates and the treasury address in one call,
setParams, which emitsParamsUpdated. - Each rate is checked against
MAX_FEE_BPS(10%) in the constructor and again insetParams. The treasury address is not bounded, so the admin can repoint where fees are paid. - A new rate applies to open liens immediately. There is no timelock today, so a change gives no notice.
- No admin function moves escrowed collateral directly. The admin can swap the price oracle with
setOracle, which controls the under-water check for cross-token liens, so it is an indirect path to user funds. That call emits no event. A timelocked multisig and per-lien oracle binding are planned for v1 and are not built. See Security and Risks.
Follow a fee through a lien
The usage fee starts when credit is drawn. What happens next depends on whether the lien is repaid or defaults.
- Creditor records a chargecharge / chargeWithAuth
- Fee is added to the debtamount × usageFeeBps ÷ 10,000
- Fee is trackedas protocolAccrued on the lien
- Owner repaysrepay / payInstallment
- Creditor is paid firstthe receivable comes before fees
- Treasury gets the feethe accrued usage fee, last
- Anyone liquidatesliquidate / liquidateAsset
- Waterfall pays outkeeper, creditor, then protocol
- Treasury gets fee + penaltyfrom whatever value remains
The liquidation waterfall
When a defaulted lien is liquidated, seized value is paid out in a fixed order. Each party is paid from what the party above it left behind.
- 1Keeper reward
debt × keeperRewardBps, paid off the topsenior - 2CreditorThe receivable:
debt − protocolAccrued - 3ProtocolAccrued usage fees plus
debt × protocolFeeBps, from what remainsjunior - 4OwnerAny collateral left over. If there was too little, the creditor absorbs the shortfall
keeperRewardV = debt * keeperRewardBps / 10000 // senior
creditorOwedV = debt - protocolAccrued // paid next, up to this
protocolClaimV = protocolAccrued
+ debt * protocolFeeBps / 10000 // paid from remainder
// order: keeper -> creditor -> protocol -> owner surplusA worked example
A lien owes $1,000. It defaults and is liquidated at the reference script rates (keeper 1%, penalty 2%), with no accrued usage fee. The keeper is owed $10, the creditor $1,000 and the protocol $20. What each party actually gets depends on how much the collateral is worth.
- Keeper
- Creditor
- Protocol
- Back to owner
- Keeper $10
- Creditor $1,000
- Protocol $20
- Back to owner $470
- Keeper $10
- Creditor $1,000
- Protocol $5
- Back to owner $0
- Keeper $10
- Creditor $890
- Protocol $0
- Back to owner $0
The protocol collects its full penalty only when collateral covers everyone ahead of it. It is junior to the keeper and the creditor, so it earns nothing from a lien that is under water. Because the keeper is paid first, the creditor can also lose up to the keeper reward when collateral is worth more than the debt. With $1,005 of collateral, the keeper gets $10, the creditor $995 and the protocol $0.
Why fees, not float
A payment rail
- Holds prefunded balances in its own custody
- Can profit from the spread and the idle cash in between
Encumbra
- Holds only the owner's escrowed collateral, which it cannot lend out or spend
- Can charge a capped fee on credit drawn, and a penalty on default
- Anyone can read the exact rates from the contract
The contract holds only the owner's escrowed collateral. It has no function that lends the collateral out or spends it (no rehypothecation), so it earns no float. Any fee revenue depends on credit being drawn, repaid or liquidated.