💰 Repayment Path
The Repayment Path is the normal closure path of a dVault. It defines how BTC leaves the vault when the loan is repaid. There’s no bridge, contract, or wrapped asset - only a Bitcoin spend that becomes valid once the correct signatures are presented.
How It Works
-
Debt Reduction
- The borrower repays stablecoins (e.g., USDC) to the protocol treasury via the
Repay()function. - The Execution Layer validates the transfer and updates the
debtUsdfield of the vault ledger.
- The borrower repays stablecoins (e.g., USDC) to the protocol treasury via the
-
Collateral Unlock
- Once the repayment is confirmed, a release signal is emitted for a proportional BTC amount.
- Signers verify the repayment event and co-sign a spend via the Repayment ScriptPath inside the Taproot tree. They cannot trigger this spend independently - the borrower’s authorization is always required.
-
Full Repayment
- When total
debtUsd = 0, the dVault can be fully unlocked. - The user + signer quorum co-sign the Bitcoin spend transaction.
- BTC is returned to the depositor’s withdrawal address.
- When total
Script Anatomy
Each repayment branch commits the following tapscript at vault creation:
# User + signer network both must sign with their signature keys.
# The execution layer attests repayment but cannot move funds.
AND(
OP_CHECKSIG(user_pubkey),
OP_CHECKSIG(lin22_signer_set_key)
)
Repayment is the simplest — yet most important — path in Surge’s lifecycle, proving that Bitcoin can be used as dynamic collateral without leaving its native chain.