BiFi is a DeFi project by the BIFROST team.
BIFI
Description
BiFi is a decentralized finance (DeFi) project that offers a financial service, which enables users to deposit various digital assets and borrow other digital assets against the deposits as collateral. BiFi consists of Solidity smart contracts, which operates on top of EVM-compatible blockchains.
Each supported digital asset on BiFi has a dedicated Market Handler Contract ("Market Handler"). All Market Handlers are intermediated by Market Manager Contract ("Market Manager").
Service Incentive Handler ("SI Handler") manages the reward program that rewards participants (service users and operators) that contributed in the growth and operation of BiFi with Service Incentive Tokens ("SI Tokens"). Liquidation Manager Contract ("Liquidation Manager") manages the liquidation process for users whose Loan-To-Value (LTV) Ratio has exceeded a set threshold.
The BiFi components interact with each other. For example, a user may borrow up to 75% of the value of previously deposited assets, and the value of any digital asset can be expressed as the product of its amount and current price. For this user (borrowing) operation, each Market Handler provides the user balance and the Oracle contract provides the current prices of each Token. Market Manager then validates and executes the action. The user also gets a service incentive for this action; The SI Handler will provide SI Tokens when the user claims. When a price of the user token significantly decreases, the user's debt can be liquidated by anyone via the Liquidation Manager contract.
The logic contracts (Market Handler, SI Handler and Market Manager) are designed so that they can be updated without changing the data storage. Each logic contract has its own data storage contracts to store the data.
Overview
actions
- Solidity CI
contracts
- Solidity contracts for BiFi
migrations
- Truffle script for testing
Description
BiFi ์๋น์ค๋ ๊ฐ์ํํ๋ฅผ ์์นํ์ฌ ์ด์๋ฅผ ์ป๊ฑฐ๋, ์์น๊ธ์ ๋ด๋ณด๋ก ๊ฐ์ํํ๋ฅผ ๋์ถํ ์ ์๋ DeFi ๊ธ์ต์๋น์ค์ด๋ค. BiFi ์๋น์ค๋ Solidity๋ก ์์ฑ๋ Smart Contract๋ก ๊ตฌ์ฑ๋์ด ์์ผ๋ฉฐ EVM ํธํ ๋ธ๋ก์ฒด์ธ์์ ๋์ํ๋ค.
BiFi๊ฐ ์ง์ํ๋ ์ฌ๋ฌ ๊ฐ์ํํ๋ ๊ณ ์ ์ Market Handler Contract(Market Handler)๋ฅผ ๊ฐ์ง๊ณ ์์ผ๋ฉฐ, ๋ชจ๋ Market Handler Contract๋ Market Manager Contract(Market Manager)์ ์ฐ๊ฒฐ๋์ด Handler ๊ฐ ์ฐ๊ณ ์์ ์ด ๊ฐ๋ฅํ๋ค.
Service Incentive Handler(SI Handler)๋ BiFi ์๋น์ค ์ ์ง์ ๊ณตํํ ์ฐธ์ฌ์์๊ฒ BiFi Token์ ๋ณด์์ผ๋ก ์ง๊ธํ๊ณ , Liquidation Manager Contract(Liquidation Manager)๋ ์ด ์์น ์์ฐ ๋๋น ์ด ๋์ถ ์์ฐ์ ๋น์จ(LTV, Loan-To-Value)์ด ์ ํด์ง ์์ค์ ๋๊ธด ์ฌ์ฉ์์ ์์ฐ์ ์ฒญ์ฐํ๋ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ค.
BiFi ์ ์ปดํฌ๋ํธ๋ ๊ฐ๊ฐ์ ๊ธฐ๋ฅ์ด ์๋ก ์ํธ์์ฉ ํ๋ค. ์๋ฅผ ๋ค์ด ์ฌ์ฉ์๋ ์ด์ ์ ์์นํ ๋ชจ๋ ๊ฐ์ํํ ๊ฐ์น์ 75%๋งํผ ๋์ถ์ ์คํํ ์ ์๋๋ฐ, Market Manager๋ Oracle Contract์์ ์ ๊ณตํ๋ ๊ฐ ๊ฐ์ํํ์ ๊ฐ๊ฒฉ์ ๋ณด๋ฅผ ์ด์ฉํ์ฌ ์ฌ์ฉ์๊ฐ ์์นํ ๊ฐ์ํํ ๊ฐ์น์ ํฉ๊ณ๋ฅผ ๋์ถํ๋ค. ์ฌ์ฉ์์ ์์ฒญ("๋์ถ")์ด ๋ฐ์ํ๋ฉด, ๊ฐ๊ฐ์ Market Handler๋ ์ฌ์ฉ์์ ์์ก์ ์ ๊ณตํ๊ณ Oracle ์ปจํธ๋ํธ๋ ๊ฐ ํ ํฐ์ ๊ฐ๊ฒฉ์ ์ ๊ณตํ๋ค.
ํํธ, BiFi ์๋น์ค์ ๋ก์ง Contract(Market Handler, SI Handler, Market Manager)๋ค์ Data๋ฅผ ์ ์งํ ์ํ๋ก ์ ๋ฐ์ดํธ ํ ์ ์๋๋ก ์ค๊ณ ๋์ด ์๋ค. ๋ก์ง Contract๋ค์ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๋ ๊ฐ๊ฐ์ Data Storage Contract๋ฅผ ๋ณด์ ํ๋ฉฐ, Handler Proxy๋ฅผ ์ด์ฉํ์ฌ ํจ๊ณผ์ ์ผ๋ก ๋ก์ง Contract๋ ๊ต์ฒด๋ ์ ์๋ค.
Overview
actions
- Solidity CI
contracts
- BiFi๋ฅผ ๊ตฌ์ฑํ๋ solidity๋ก ์ง์ฌ์ง contracts
migrations
- Test์ฉ truffle script