Documentation Overview
BitZap is a cutting-edge decentralized exchange aimed at becoming the premier platform for BTC assets trading and go-to solution for BTC assets trading, BTC LRT settlements, BTC assets Lending, and more!
To further enhance its ecosystem, BitZap has introduced its proprietary stablecoin, yUSD, and BitZap Lending, both of which incorporate a distinctive liquidation mechanism called LLAMMA.
This documentation provides a detailed technical overview of the core BitZap protocol and its associated smart contracts. It serves as a valuable resource for contributors to the BitZap codebase, third-party integrators, and technically adept users of the platform.
GitHub
The source code for all releveant stablecoin contract can be found on GitHub . Related deployments can be found here.
Curve Stablecoin Infrastructure ComponentsΒΆ
-
crvUSD
crvUSDtoken which is based on the ERC-20 Token Standard. -
Savings crvUSD
Savings crvUSD, abbreviated as
scrvUSD, is a yield-bearing version of crvUSD built on top of a Yearn V3 Vault. It earns a portion of the yield generated by borrowers who pay interest to mint crvUSD. -
Controller
The Controller is the contract the user interacts with to create a loan and further manage the position. It holds all user debt information. External liquidations are also done through it.
-
LLAMMA
LLAMMA is the market-making contract that rebalances the collateral. As the name suggests, this contract is responsible for liquidating collateral. Every market has its own AMM (created from a blueprint contract) containing the collateral asset and crvUSD.
-
Factory
The Factory is used to add new markets, raise or lower debt ceilings of already existing markets, set blueprint contracts for AMM and Controller, and set fee receiver.
-
Monetary Policy
Monetary policy contracts are integrated into the crvUSD system and are responsible for the interest rate of crvUSD markets.
-
PegKeepers
PegKeepers are contracts that help stabilize the peg of crvUSD. They are allocated a specific amount of crvUSD to secure the peg.
-
Price Aggregator
The AggregatorStablePrice contract is designed to aggregate the price of crvUSD based on multiple Curve pools. This price is mainly used as an oracle for calculating the interest rate, providing an aggregated and exponential moving average price.
-
Oracles
Oracle contract used for collaterals in the markets.
-
Flash Loan
The
FlashLender.vycontract allows users to take out a flash loan forcrvUSD.