Summary
Audit of the Granite Safety Module, a critical component providing risk management and safety mechanisms for the Granite lending protocol on Stacks.
Audited Functionality
Granite is a DeFi lending market that offers overcollateralized loans on SIP-10 tokens managed and operated by immutable smart contracts. Granite was created and is managed by Trust Machines, a leading team of engineers, builders and researchers within the Stacks Bitcoin L2 ecosystem.
The newly added Granite Safety Module introduces LP tranches into the protocol, which allows Liquidity Providers to stake their LP tokens to earn a higher yield in exchange for being the first payers for bad debt.
Users stake their LP tokens and in return receive Staked-LP tokens, which are calculated and tracked using the standard share vault model.
Yields from repayments of debt are auto-compounded by the protocol by minting LP tokens into the Staked LP pool equal in value to the pool's share of a repayment. Staked LPs earn the base yield of unstaked LPs plus additional yield from staking.
This extension is inspired by Aave Safety Module - Umbrella.
Findings Breakdown
About Granite
www.granite.worldGranite is a Bitcoin liquidity protocol built on Stacks that allows users to borrow stablecoins against their Bitcoin collateral. Incubated by Trust Machines, the protocol uses sBTC (a decentralized Bitcoin bridge) to connect Bitcoin to DeFi while keeping BTC securely stored on the Bitcoin blockchain. Key features include isolated collateral with no rehypothecation (user collateral is never lent to others), soft liquidations that only liquidate the minimum amount required to restore solvency, and offline position tracking via push notifications. The protocol serves both borrowers seeking liquidity without selling their Bitcoin and lenders earning yield by providing stablecoins to the liquidity pool.