Ver3.0 ๐ฐ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ๊ตฌ์กฐ์ ์๋ฆฌ์ ์๋ ๋ฉ์ปค๋์ฆ ์์ ๋ถ์

๐ฐ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ๊ตฌ์กฐ์ ์๋ฆฌ์ ์๋ ๋ฉ์ปค๋์ฆ ์์ ๋ถ์
ํ์ค์ํ ๊ธ์ต์ ๊ฟ๊ณผ ํ์ค, ๊ทธ ๋ณต์กํ ์๊ณ ๋ฆฌ์ฆ ์์ผ๋ก ๐
์์ฆ ์ํธํํ ์์ฅ์์ ์คํ
์ด๋ธ์ฝ์ธ ์๊ธฐ ์ ๋์ค๋ ๋ ์ด ์์ฃ ? ํนํ ์๊ณ ๋ฆฌ์ฆ ์คํ
์ด๋ธ์ฝ์ธ์ ์ง์ง ๋ธ๋ก์ฒด์ธ์ ๊ฝ์ด๋ผ๊ณ ํ ์ ์์ด์ ใ
ใ
ใ
์ค์ํ๋ ๋ด๋ณด ์์ด ์์ํ๊ฒ ์๊ณ ๋ฆฌ์ฆ๋ง์ผ๋ก ๊ฐ๊ฒฉ์ ์ ์งํ๋ค๋ ๊ฒ ๋ง์ด ๋๋ ์ถ์ง๋ง, ์ค์ ๋ก ์๋ํ๋ ์๋ฆฌ๋ฅผ ๋ณด๋ฉด ์ ๋ง ์ ๊ธฐํ๊ฑฐ๋ ์! ๐ฎ
๋ฌผ๋ก ํ
๋ผ-๋ฃจ๋ ์ฌํ ๊ฐ์ ๋ํ ์ฌ๊ณ ๋ ์์์ง๋ง, ๊ทธ๋์ ๋๋์ฑ ์ด ๊ธฐ์ ์ ๊ตฌ์กฐ์ ์๋ฆฌ๋ฅผ ์ ๋๋ก ์ดํดํ๋ ๊ฒ ์ค์ํด์ก์ด์. ์ค๋์ ์๊ณ ๋ฆฌ์ฆ ์คํ
์ด๋ธ์ฝ์ธ์ด ์ด๋ป๊ฒ ์๋ํ๋์ง, ๊ทธ ๋ด๋ถ ๋ฉ์ปค๋์ฆ์ ์์ ํ ํํค์ณ๋ณผ๊ฒ์! ๐
๐ฏ ์คํ ์ด๋ธ์ฝ์ธ์ ๊ธฐ๋ณธ ๊ฐ๋ ๋ถํฐ ์์!
์คํ
์ด๋ธ์ฝ์ธ์ด ๋ญ๋๊ณ ์? ๊ฐ๋จํ๊ฒ ๋งํ๋ฉด ๊ฐ๊ฒฉ ๋ณ๋์ฑ์ ์ต์ํํ ์ํธํํ์์. ๋นํธ์ฝ์ธ์ด๋ ์ด๋๋ฆฌ์์ ํ๋ฃจ์๋ ๋ช์ญ ํผ์ผํธ์ฉ ์ค๋ฅด๋ฝ๋ด๋ฆฌ๋ฝ ํ์์์? ๊ทธ๋ฐ๋ฐ ์คํ
์ด๋ธ์ฝ์ธ์ ๋ณดํต 1๋ฌ๋ฌ์ ๊ณ ์ ๋์ด ์์ด์ ๊ฒฐ์ ์๋จ์ด๋ ๊ฐ์น ์ ์ฅ ์๋จ์ผ๋ก ์ธ ์ ์์ฃ ใ
ใ
์คํ
์ด๋ธ์ฝ์ธ์ ํฌ๊ฒ ์ธ ๊ฐ์ง ํ์
์ผ๋ก ๋๋์ด์:
| ์ ํ | ๋ด๋ณด ๋ฐฉ์ | ๋ํ ์ฌ๋ก | ํน์ง |
|---|---|---|---|
| ๋ฒ์ ํํ ๋ด๋ณดํ | ์ค์ ๋ฌ๋ฌ 1:1 ๋ณด๊ด | USDT, USDC | ๊ฐ์ฅ ์์ ์ ์ด์ง๋ง ์ค์ํ๋จ |
| ์ํธํํ ๋ด๋ณดํ | ์ํธํํ ๊ณผ๋ด๋ณด | DAI | ํ์ค์ํ๋์ง๋ง ์๋ณธ ํจ์จ ๋ฎ์ |
| ์๊ณ ๋ฆฌ์ฆํ | ๋ด๋ณด ์์ | UST, FRAX | ์์ ํ์ค์ํ, ๋์ ๋ฆฌ์คํฌ |
์ฐ๋ฆฌ๊ฐ ์ค๋ ์ง์คํ ๊ฑด ๋ฐ๋ก ์ธ ๋ฒ์งธ, ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ด์์! ์ด๊ฒ ์ง์ง ๋ธ๋ก์ฒด์ธ ๊ธฐ์ ์ ์ ์๋ผ๊ณ ํ ์ ์๊ฑฐ๋ ์ ๐
๐ฌ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ํต์ฌ ์๋ฆฌ
์๊ณ ๋ฆฌ์ฆ ์คํ
์ด๋ธ์ฝ์ธ์ ๊ธฐ๋ณธ ์์ด๋์ด๋ ์์ฒญ ์ฌํํด์. ์์์ ๊ณต๊ธ์ ์๊ณ ๋ฆฌ์ฆ์ผ๋ก ์กฐ์ ํด์ ๊ฐ๊ฒฉ์ 1๋ฌ๋ฌ์ ์ ์งํ๋ ๊ฑฐ์ฃ . ๋ง์น ์ค์์ํ์ด ํตํ๋์ ์กฐ์ ํ๋ ๊ฒ์ฒ๋ผ์!
๊ทผ๋ฐ ์ค์์ํ ์์ด ์ด๋ป๊ฒ ์ด๊ฒ ๊ฐ๋ฅํ ๊น์? ๋ฐ๋ก ์ค๋งํธ ์ปจํธ๋ํธ์ ์ธ์ผํฐ๋ธ ๋ฉ์ปค๋์ฆ์ ํ์ฉํ๋ ๊ฑฐ์์ ใ
ใ
ใ
๊ฐ๊ฒฉ์ด 1๋ฌ๋ฌ๋ณด๋ค ๋์์ง๋ฉด? โ ๊ณต๊ธ์ ๋๋ ค์ ๊ฐ๊ฒฉ์ ๋ด๋ฆผ ๐
๊ฐ๊ฒฉ์ด 1๋ฌ๋ฌ๋ณด๋ค ๋ฎ์์ง๋ฉด? โ ๊ณต๊ธ์ ์ค์ฌ์ ๊ฐ๊ฒฉ์ ์ฌ๋ฆผ ๐
์ด ๊ฐ๋จํ ์๋ฆฌ๋ฅผ ์ค์ ๋ก ๊ตฌํํ๋ ๋ฐฉ๋ฒ์ ์ฌ๋ฌ ๊ฐ์ง๊ฐ ์์ด์. ๋ํ์ ์ธ ๋ชจ๋ธ๋ค์ ํ๋์ฉ ๋ฏ์ด๋ณผ๊ฒ์!
๐๏ธ ๋ฆฌ๋ฒ ์ด์ค(Rebase) ๋ชจ๋ธ - ๊ฐ์ฅ ๋จ์ํ ๋ฐฉ์
๋ฆฌ๋ฒ ์ด์ค ๋ชจ๋ธ์ ์๊ณ ๋ฆฌ์ฆ ์คํ
์ด๋ธ์ฝ์ธ ์ค์์ ๊ฐ์ฅ ์ง๊ด์ ์ธ ๋ฐฉ์์ด์์. ๋ชจ๋ ์ง๊ฐ์ ํ ํฐ ์๋์ ์๋์ผ๋ก ์กฐ์ ํ๋ ๊ฑฐ์ฃ ใ
ใ
ใ
์๋ฅผ ๋ค์ด๋ณผ๊ฒ์. ๋น์ ์ด 100๊ฐ์ ๋ฆฌ๋ฒ ์ด์ค ์คํ
์ด๋ธ์ฝ์ธ์ ๊ฐ์ง๊ณ ์๋ค๊ณ ํด๋ด์:
โ ๋น์ ์ ์ง๊ฐ: 100๊ฐ โ 120๊ฐ๋ก ์๋ ์ฆ๊ฐ
โ ๊ฐ๊ฒฉ: 1.2๋ฌ๋ฌ โ 1.0๋ฌ๋ฌ๋ก ์กฐ์ ๋จ
โ ๋น์ ์ ์ง๊ฐ: 100๊ฐ โ 80๊ฐ๋ก ์๋ ๊ฐ์
โ ๊ฐ๊ฒฉ: 0.8๋ฌ๋ฌ โ 1.0๋ฌ๋ฌ๋ก ์กฐ์ ๋จ
๋ฆฌ๋ฒ ์ด์ค๋ ๋ณดํต 24์๊ฐ๋ง๋ค ํ ๋ฒ์ฉ ์คํ๋ผ์. ์ค๋งํธ ์ปจํธ๋ํธ๊ฐ ์ค๋ผํด(Oracle)๋ก๋ถํฐ ํ์ฌ ๊ฐ๊ฒฉ ์ ๋ณด๋ฅผ ๋ฐ์์์ ์๋์ผ๋ก ๊ณ์ฐํ์ฃ :
// ๋ฆฌ๋ฒ ์ด์ค ๊ณ์ฐ ์์ (Solidity ์คํ์ผ ์์ฌ์ฝ๋)
function rebase() public {
uint256 currentPrice = oracle.getPrice();
uint256 targetPrice = 1e18; // 1๋ฌ๋ฌ (18 decimals)
if (currentPrice > targetPrice) {
// ๊ฐ๊ฒฉ์ด ๋์ผ๋ฉด ๊ณต๊ธ ์ฆ๊ฐ
uint256 supplyDelta = totalSupply * (currentPrice - targetPrice) / targetPrice;
totalSupply += supplyDelta;
} else if (currentPrice < targetPrice) {
// ๊ฐ๊ฒฉ์ด ๋ฎ์ผ๋ฉด ๊ณต๊ธ ๊ฐ์
uint256 supplyDelta = totalSupply * (targetPrice - currentPrice) / targetPrice;
totalSupply -= supplyDelta;
}
// ๋ชจ๋ ๊ณ์ ์ ์์ก์ด ๋น๋ก์ ์ผ๋ก ์กฐ์ ๋จ
emit Rebase(epoch, totalSupply);
}
1. ์ฌ์ฉ์ ๊ฒฝํ ๋ฌธ์ : ์ง๊ฐ์ ์๋ ํ ํฐ ์๋์ด ๊ณ์ ๋ณํ๋๊น ํผ๋์ค๋ฌ์ ใ ใ ใ
2. DeFi ํธํ์ฑ: ๋๋ถ๋ถ์ DeFi ํ๋กํ ์ฝ์ด ์์ก ๋ณ๋์ ์์ํ์ง ๋ชปํจ
3. ์ฌ๋ฆฌ์ ์ ํญ: ํ ํฐ์ด ์ค์ด๋๋ ๊ฑธ ๋ณด๋ฉด ๊ธฐ๋ถ์ด ์ ์ข์ ๐
4. ์ฃฝ์์ ๋์ : ๊ฐ๊ฒฉ์ด ๊ณ์ ๋จ์ด์ง๋ฉด ๋ฆฌ๋ฒ ์ด์ค๋ ๊ณ์ ์์๊ฐ ๋๋ ์ ์ํ
๐ ๋์ผ ํ ํฐ ๋ชจ๋ธ - ์ธ๋จ๋ฆฌ์ง ์์ด ๋ฐฉ์
๋์ผ ํ ํฐ ๋ชจ๋ธ์ ๋ฆฌ๋ฒ ์ด์ค์ ๋จ์ ์ ๋ณด์ํ๊ธฐ ์ํด ๋์จ ๋ฐฉ์์ด์์. ์คํ
์ด๋ธ์ฝ์ธ๊ณผ ๋ณ๋์ฑ ํ ํฐ, ๋ ๊ฐ์ ํ ํฐ์ ์ฌ์ฉํ๋ ๊ฑฐ์ฃ ! ์ด๊ฒ ๋ฐ๋ก ํ
๋ผ-๋ฃจ๋๊ฐ ์ฌ์ฉํ๋ ๋ฐฉ์์ด๊ธฐ๋ ํด์ (๋ฌผ๋ก ๋งํ์ง๋ง... ๐ข)
์ด ๋ชจ๋ธ์์๋:
โข ๊ฐ๊ฒฉ: 1๋ฌ๋ฌ ๊ณ ์ ๋ชฉํ
โข ์ฉ๋: ๊ฒฐ์ , ๊ฑฐ๋
โข ์์: UST, AMPL
โข ๊ฐ๊ฒฉ: ์์ฅ์์ ์์ ๋กญ๊ฒ ๊ฒฐ์
โข ์ฉ๋: ๊ฐ์น ํก์, ๊ฑฐ๋ฒ๋์ค
โข ์์: LUNA, SHARE
์ด ์์คํ ์ ํต์ฌ์ ์ฐจ์ต๊ฑฐ๋(Arbitrage)๋ฅผ ํตํ ๊ฐ๊ฒฉ ์์ ํ์์. ์๋ ๋ฐฉ์์ ์์ธํ ๋ณผ๊ฒ์:
1๏ธโฃ ์ฐจ์ต๊ฑฐ๋์๊ฐ 1๋ฌ๋ฌ์ด์น์ ๋ณ๋์ฑ ํ ํฐ์ ์์คํ ์ ์์น
2๏ธโฃ ์์คํ ์ด 1๊ฐ์ ์๋ก์ด ์คํ ์ด๋ธ์ฝ์ธ์ ๋ฐํํด์ค
3๏ธโฃ ์ฐจ์ต๊ฑฐ๋์๊ฐ ์ด๊ฑธ ์์ฅ์์ 1.1๋ฌ๋ฌ์ ํ๋งค
4๏ธโฃ 0.1๋ฌ๋ฌ์ ์ฐจ์ต ์คํ! ๐ฐ
5๏ธโฃ ์คํ ์ด๋ธ์ฝ์ธ ๊ณต๊ธ ์ฆ๊ฐ โ ๊ฐ๊ฒฉ ํ๋ฝ โ 1๋ฌ๋ฌ๋ก ์๋ ด
1๏ธโฃ ์ฐจ์ต๊ฑฐ๋์๊ฐ ์์ฅ์์ 0.9๋ฌ๋ฌ์ ์คํ ์ด๋ธ์ฝ์ธ ๊ตฌ๋งค
2๏ธโฃ ์์คํ ์ ์คํ ์ด๋ธ์ฝ์ธ์ ์๊ฐํ๊ณ 1๋ฌ๋ฌ์ด์น์ ๋ณ๋์ฑ ํ ํฐ ์๋ น
3๏ธโฃ 0.1๋ฌ๋ฌ์ ์ฐจ์ต ์คํ! ๐ฐ
4๏ธโฃ ์คํ ์ด๋ธ์ฝ์ธ ๊ณต๊ธ ๊ฐ์ โ ๊ฐ๊ฒฉ ์์น โ 1๋ฌ๋ฌ๋ก ์๋ ด
// ๋์ผ ํ ํฐ ๋ฏผํ
/์๊ฐ ๋ฉ์ปค๋์ฆ (์์ฌ์ฝ๋)
contract AlgorithmicStablecoin {
StableToken public stable; // ์คํ
์ด๋ธ์ฝ์ธ
VolatileToken public volatile; // ๋ณ๋์ฑ ํ ํฐ
Oracle public priceOracle;
// ์คํ
์ด๋ธ์ฝ์ธ ๊ฐ๊ฒฉ์ด ๋์ ๋: ์๋ก ๋ฐํ
function mintStable(uint256 volatileAmount) public {
uint256 stablePrice = priceOracle.getStablePrice();
require(stablePrice >= 1e18, "Price too low");
// ๋ณ๋์ฑ ํ ํฐ์ ๋ฐ๊ณ ์คํ
์ด๋ธ์ฝ์ธ ๋ฐํ
volatile.transferFrom(msg.sender, address(this), volatileAmount);
uint256 stableToMint = volatileAmount * getVolatilePrice() / 1e18;
stable.mint(msg.sender, stableToMint);
emit StableMinted(msg.sender, stableToMint);
}
// ์คํ
์ด๋ธ์ฝ์ธ ๊ฐ๊ฒฉ์ด ๋ฎ์ ๋: ์๊ฐํ๊ณ ๋ณ๋์ฑ ํ ํฐ ๋ฐ๊ธฐ
function burnStable(uint256 stableAmount) public {
uint256 stablePrice = priceOracle.getStablePrice();
require(stablePrice <= 1e18, "Price too high");
// ์คํ
์ด๋ธ์ฝ์ธ์ ์๊ฐํ๊ณ ๋ณ๋์ฑ ํ ํฐ ์ง๊ธ
stable.burnFrom(msg.sender, stableAmount);
uint256 volatileToGive = stableAmount * 1e18 / getVolatilePrice();
volatile.transfer(msg.sender, volatileToGive);
emit StableBurned(msg.sender, stableAmount);
}
function getVolatilePrice() public view returns (uint256) {
return priceOracle.getVolatilePrice();
}
}
๐ฒ ํ ๋ผ-๋ฃจ๋ ์ผ์ด์ค ์คํฐ๋: ์ ์คํจํ์๊น?
ํ
๋ผ-๋ฃจ๋๋ ๋์ผ ํ ํฐ ๋ชจ๋ธ์ ๋ํ์ ์ธ ์ฌ๋ก์๋๋ฐ... 2022๋
5์์ ์์ ํ ๋ถ๊ดดํ์ฃ ๐ฑ ์๊ฐ์ด์ก 400์ต ๋ฌ๋ฌ๊ฐ ๋ฉฐ์น ๋ง์ ์ฆ๋ฐํ์ด์. ์ด ์ฌ๊ฑด์ ๋ถ์ํ๋ฉด ์๊ณ ๋ฆฌ์ฆ ์คํ
์ด๋ธ์ฝ์ธ์ ๊ตฌ์กฐ์ ์ทจ์ฝ์ ์ ์ดํดํ ์ ์์ด์.
๋ถ๊ดด ๊ณผ์ ์ ํ์๋ผ์ธ์ผ๋ก ์ ๋ฆฌํด๋ณผ๊ฒ์:
| ๋ ์ง | UST ๊ฐ๊ฒฉ | LUNA ๊ฐ๊ฒฉ | ์ฃผ์ ์ด๋ฒคํธ |
|---|---|---|---|
| 5์ 7์ผ | $1.00 | $80 | ์ ์ ์ํ ์ ์ง |
| 5์ 8์ผ | $0.98 | $70 | ๋๊ท๋ชจ UST ๋งค๋ ์์ |
| 5์ 9์ผ | $0.91 | $50 | ๋ํ๊น ๋ณธ๊ฒฉํ, ํจ๋ ์์ |
| 5์ 10์ผ | $0.68 | $25 | LUNA ํ์ดํผ์ธํ๋ ์ด์ ์์ |
| 5์ 11์ผ | $0.35 | $5 | ์์คํ ์์ ๋ถ๊ดด ๋จ๊ณ |
| 5์ 12์ผ | $0.12 | $0.50 | ์ฃฝ์์ ๋์ ์์ฑ |
| 5์ 13์ผ | $0.08 | $0.0002 | ์ฌ์ค์ ๊ฐ์น ์๋ฉธ |
ํ ๋ผ-๋ฃจ๋๊ฐ ๋ฌด๋์ง ํต์ฌ ์ด์ ๋ ๋ฐ๋ก ์ฃฝ์์ ๋์ ์ด์์. ์ด๊ฒ ์ด๋ป๊ฒ ์๋ํ๋์ง ๋จ๊ณ๋ณ๋ก ๋ณผ๊ฒ์:
โข ์ผ๋ถ ์ฌ์ฉ์๋ค์ด ๋ถ์ํด์ UST๋ฅผ LUNA๋ก ๊ตํ ์์
โข LUNA ๊ณต๊ธ๋ ์ฆ๊ฐ โ LUNA ๊ฐ๊ฒฉ ํ๋ฝ
2๋จ๊ณ: ์ ๋ขฐ ๋ถ๊ดด
โข LUNA ๊ฐ๊ฒฉ ํ๋ฝ์ ๋ณธ ๋ ๋ง์ ์ฌ๋๋ค์ด ํจ๋
โข UST๋ฅผ LUNA๋ก ๋ฐ๊พธ๋ ค๋ ์์ ํญ์ฆ
โข LUNA ํ์ดํผ์ธํ๋ ์ด์ ๋ฐ์ (๊ณต๊ธ๋ ๊ธฐํ๊ธ์์ ์ฆ๊ฐ)
3๋จ๊ณ: ์์คํ ๋ง๋น
โข LUNA ๊ฐ๊ฒฉ์ด ๋๋ฌด ๋ฎ์์ ธ์ UST๋ฅผ ๋ฐ์ณ์ค ์ ์์
โข UST ๊ฐ๊ฒฉ ๋์ฑ ํ๋ฝ
โข ๋ ๋ง์ LUNA ๋ฐํ ํ์ โ ์ ์ํ ๊ฐ์ํ
4๋จ๊ณ: ์์ ๋ถ๊ดด
โข LUNA ๊ณต๊ธ๋์ด ์์กฐ ๊ฐ๋ก ํญ์ฆ
โข ๊ฐ๊ฒฉ์ด ์์์ ์ดํ๋ก ์ถ๋ฝ
โข UST๋ ํ๊น ์์ ํ ์์ค
โข ์์คํ ์ ์ฒด๊ฐ ๋ฌด๊ฐ์นํด์ง ๐ฅ
// ์ฃฝ์์ ๋์ ์ ์์์ผ๋ก ํํํ๋ฉด
while (UST_price < 1.0) {
panic_level++;
// UST๋ฅผ LUNA๋ก ๊ตํํ๋ ค๋ ์์ ์ฆ๊ฐ
luna_mint_demand = (1.0 - UST_price) * total_UST_supply * panic_level;
// LUNA ๋๋ ๋ฐํ
luna_supply += luna_mint_demand;
// LUNA ๊ฐ๊ฒฉ ํ๋ฝ
luna_price = luna_market_cap / luna_supply;
// LUNA ๊ฐ๊ฒฉ์ด ๋ฎ์์ง๋ฉด UST ์ ๋ขฐ๋ ๋ ํ๋ฝ
UST_price -= (1.0 - luna_price / previous_luna_price) * confidence_factor;
// ์
์ํ ๊ฐ์
if (luna_price < critical_threshold) {
panic_level *= 2; // ํจ๋ ๋ฐฐ๊ฐ!
}
}
// ๊ฒฐ๊ณผ: ์์คํ
๋ถ๊ดด ๐ฑ
2. ์ ๋ขฐ ์์กด์ฑ: ์์คํ ์ด ์์ ํ ์ฌ์ฉ์ ์ ๋ขฐ์๋ง ์์กด
3. ๊ท๋ชจ์ ๋ฌธ์ : ๋๋ฌด ๋น ๋ฅด๊ฒ ์ฑ์ฅํด์ ์ถฉ๊ฒฉ ํก์ ๋ฅ๋ ฅ ๋ถ์กฑ
4. ์ต์ปค ํ๋กํ ์ฝ: 20% APY๋ผ๋ ๋นํ์ค์ ์์ต๋ฅ ์ด ๊ฑฐํ ํ์ฑ
5. ์ธ๋ถ ๊ณต๊ฒฉ: ๋๊ท๋ชจ ์๋ณธ์ ์๋์ ๊ณต๊ฒฉ์ ์ทจ์ฝํ์
๐ก๏ธ ๊ฐ์ ๋ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ ๋ชจ๋ธ๋ค
ํ ๋ผ-๋ฃจ๋ ์ฌํ ์ดํ์๋ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ ๊ฐ๋ฐ์ ๊ณ์๋๊ณ ์์ด์! ๋ค๋ง ์ด์ ๋ ๋ ์์ ํ ๋ฉ์ปค๋์ฆ์ ์ ์ฉํ๊ณ ์์ฃ ใ ใ ๋ํ์ ์ธ ๊ฐ์ ๋ชจ๋ธ๋ค์ ์ดํด๋ณผ๊ฒ์ ๐ง
FRAX๋ ์๊ณ ๋ฆฌ์ฆ๊ณผ ๋ด๋ณด๋ฅผ ํผํฉํ ํ์ด๋ธ๋ฆฌ๋ ๋ชจ๋ธ์ด์์. ์์ ํ ๋ด๋ณด ์์ด ๊ฐ๋ ๊ฒ ์๋๋ผ, ์ผ๋ถ๋ USDC ๊ฐ์ ์์ ์ ์ธ ์์ฐ์ผ๋ก ๋ด๋ณดํ๊ณ , ๋๋จธ์ง๋ ์๊ณ ๋ฆฌ์ฆ์ผ๋ก ๊ด๋ฆฌํ๋ ๊ฑฐ์ฃ !
๐ FRAX์ ๋ด๋ณด ๋น์จ (Collateral Ratio)FRAX์ ํต์ฌ์ ๋ด๋ณด ๋น์จ(CR)์ด ๋์ ์ผ๋ก ๋ณํ๋ค๋ ๊ฑฐ์์:
โข FRAX ๊ฐ๊ฒฉ์ด 1๋ฌ๋ฌ ์ดํ์ผ ๋: CR ์ฆ๊ฐ (๋ด๋ณด ๋น์ค ์ฆ๊ฐ)
โข ์์ฅ ์ํฉ์ ๋ฐ๋ผ 0%~100% ์ฌ์ด์์ ์๋ ์กฐ์
// FRAX ๋ฏผํ
๋ฉ์ปค๋์ฆ (์์ฌ์ฝ๋)
function mintFRAX(uint256 amount) public {
uint256 cr = getCollateralRatio(); // ํ์ฌ ๋ด๋ณด ๋น์จ
// ํ์ํ ๋ด๋ณด (USDC)
uint256 collateralNeeded = amount * cr / 100;
// ํ์ํ FXS (๊ฑฐ๋ฒ๋์ค ํ ํฐ)
uint256 fxsNeeded = amount * (100 - cr) / 100;
// ์ฌ์ฉ์๋ก๋ถํฐ ์์ฐ ๋ฐ๊ธฐ
USDC.transferFrom(msg.sender, address(this), collateralNeeded);
FXS.burnFrom(msg.sender, fxsNeeded);
// FRAX ๋ฐํ
FRAX.mint(msg.sender, amount);
}
function updateCollateralRatio() public {
uint256 fraxPrice = oracle.getFRAXPrice();
if (fraxPrice > 1.01e18) {
// ๊ฐ๊ฒฉ์ด ๋์ผ๋ฉด ๋ด๋ณด ๋น์จ ๊ฐ์ (0.25%์ฉ)
collateralRatio = max(collateralRatio - 0.25%, 0%);
} else if (fraxPrice < 0.99e18) {
// ๊ฐ๊ฒฉ์ด ๋ฎ์ผ๋ฉด ๋ด๋ณด ๋น์จ ์ฆ๊ฐ (0.25%์ฉ)
collateralRatio = min(collateralRatio + 0.25%, 100%);
}
}
์ด ๋ฐฉ์์ ์ฅ์ ์ ์์ฅ์ด ์์ ์ ์ผ ๋๋ ์๋ณธ ํจ์จ์ฑ์ ๋์ด๊ณ , ์๊ธฐ ์ํฉ์์๋ ๋ด๋ณด ๋น์จ์ ๋์ฌ์ ์์ ์ฑ์ ํ๋ณดํ๋ค๋ ๊ฑฐ์์! ์ง์ง ๋๋ํ์ฃ ? ใ ใ ใ
RAI๋ ์ข ํน์ดํ ์ ๊ทผ์ ํด์. ์์ 1๋ฌ๋ฌ์ ๊ณ ์ ํ์ง ์๋ ์คํ ์ด๋ธ์ฝ์ธ์ด์์! ๋์ ์์ฅ ์ํฉ์ ๋ฐ๋ผ ๋ชฉํ ๊ฐ๊ฒฉ์ด ์ฒ์ฒํ ์์ง์ด๋ ๊ฑฐ์ฃ .
๐ฏ RAI์ ๋ฆฌ๋์ ๋ ์ดํธ(Redemption Rate)RAI๋ ๋ฆฌ๋์ ๋ ์ดํธ๋ผ๋ ๊ฐ๋ ์ ์ฌ์ฉํด์. ์ด๊ฒ ๋ญ๋๋ฉด:
โ ๋ฆฌ๋์ ๋ ์ดํธ ๊ฐ์
โ ๋ฏธ๋ ๋ชฉํ ๊ฐ๊ฒฉ ํ๋ฝ
โ ๋ณด์ ์ธ์ผํฐ๋ธ ๊ฐ์
โ ๋งค๋ ์๋ ฅ ์ฆ๊ฐ
โ ๋ฆฌ๋์ ๋ ์ดํธ ์ฆ๊ฐ
โ ๋ฏธ๋ ๋ชฉํ ๊ฐ๊ฒฉ ์์น
โ ๋ณด์ ์ธ์ผํฐ๋ธ ์ฆ๊ฐ
โ ๋งค์ ์๋ ฅ ์ฆ๊ฐ
// RAI ๋ฆฌ๋์
๋ ์ดํธ ์กฐ์ (์์ฌ์ฝ๋)
function updateRedemptionRate() public {
int256 marketPrice = oracle.getRAIPrice();
int256 redemptionPrice = getRedemptionPrice();
// PID ์ปจํธ๋กค๋ฌ๋ก ๋ ์ดํธ ์กฐ์
int256 error = marketPrice - redemptionPrice;
// ๋น๋ก(P) ํญ
int256 pTerm = Kp * error;
// ์ ๋ถ(I) ํญ
integralError += error;
int256 iTerm = Ki * integralError;
// ๋ฏธ๋ถ(D) ํญ
int256 dTerm = Kd * (error - lastError);
lastError = error;
// ์๋ก์ด ๋ฆฌ๋์
๋ ์ดํธ ๊ณ์ฐ
redemptionRate = pTerm + iTerm + dTerm;
// ๋ชฉํ ๊ฐ๊ฒฉ ์
๋ฐ์ดํธ
redemptionPrice = redemptionPrice * (1 + redemptionRate);
}
RAI๋ ETH๋ฅผ ๋ด๋ณด๋ก ์ฌ์ฉํ๋ฉด์๋, ๊ฐ๊ฒฉ ์์ ํ๋ฅผ ์ํด ์ด๋ฐ ์ ๊ตํ ์ ์ด ์์คํ ์ ์ฌ์ฉํด์. ๊ณตํ์ ์ผ๋ก ์ ๊ทผํ ๊ฑฐ์ฃ ! ๐ค
Olympus DAO์ OHM์ ๋ ๋ค๋ฅธ ํ์ ์ ์ธ ์ ๊ทผ์ด์์. ํ๋กํ ์ฝ ์์ฒด๊ฐ ์ ๋์ฑ์ ์์ ํ๋ ๊ฑฐ์ฃ !
๐ ๋ณธ๋ฉ(Bonding) ๋ฉ์ปค๋์ฆOHM์ ์ฌ์ฉ์๋ค์ด LP ํ ํฐ์ด๋ ๋ค๋ฅธ ์์ฐ์ ํ๋กํ ์ฝ์ ํ ์ธ๋ ๊ฐ๊ฒฉ์ผ๋ก ํ๋งคํ ์ ์๊ฒ ํด์. ๊ทธ ๋๊ฐ๋ก OHM์ ๋ฐ๋ ๊ฑฐ์ฃ :
2. ํ๋กํ ์ฝ์ด ์์ฅ๊ฐ๋ณด๋ค 5% ํ ์ธ๋ ๊ฐ๊ฒฉ์ผ๋ก OHM ์ง๊ธ
3. ๋จ, OHM์ 5์ผ์ ๊ฑธ์ณ ๋ฒ ์คํ ๋จ
4. ํ๋กํ ์ฝ์ LP ํ ํฐ์ ์๊ตฌ ์์ โ ์ ๋์ฑ ํ๋ณด!
// OHM ๋ณธ๋ฉ ๋ฉ์ปค๋์ฆ (์์ฌ์ฝ๋)
function bond(uint256 lpAmount) public {
// LP ํ ํฐ ๊ฐ์น ๊ณ์ฐ
uint256 lpValue = calculateLPValue(lpAmount);
// ํ ์ธ์จ ์ ์ฉ (์: 5%)
uint256 discount = 5; // 5%
uint256 ohmAmount = lpValue * (100 + discount) / 100 / getOHMPrice();
// LP ํ ํฐ ๋ฐ๊ธฐ
lpToken.transferFrom(msg.sender, treasury, lpAmount);
// ๋ฒ ์คํ
์ค์ผ์ค ์์ฑ (5์ผ)
createVestingSchedule(msg.sender, ohmAmount, 5 days);
emit BondCreated(msg.sender, lpAmount, ohmAmount);
}
// (3,3) ๊ฒ์ ์ด๋ก
// Stake: ๋น์ +, ํ๋กํ ์ฝ +
// Bond: ๋น์ +, ํ๋กํ ์ฝ +
// Sell: ๋น์ -, ํ๋กํ ์ฝ -
OHM์ ๋ชฉํ๋ 1๋ฌ๋ฌ ํ๊น ์ด ์๋๋ผ ํ๋กํ ์ฝ ์์ ๊ฐ์น(POV)๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ ๊ฐ๊ฒฉ ํํ์ ์ ๋ง๋๋ ๊ฑฐ์์. ์์ ํ ๋ค๋ฅธ ํจ๋ฌ๋ค์์ด์ฃ ! ๐ฎ
โ๏ธ ํต์ฌ ๊ธฐ์ ์์๋ค
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ์ ๋๋ก ์ดํดํ๋ ค๋ฉด ๋ช ๊ฐ์ง ํต์ฌ ๊ธฐ์ ์์๋ฅผ ์์์ผ ํด์. ์ด๊ฒ๋ค์ด ์์คํ ์ ๋ผ๋๋ฅผ ์ด๋ฃจ๊ฑฐ๋ ์! ๐๏ธ
์ค๋ผํด์ ๋ธ๋ก์ฒด์ธ ์ธ๋ถ์ ์ค์ ๊ฐ๊ฒฉ ์ ๋ณด๋ฅผ ์ค๋งํธ ์ปจํธ๋ํธ์ ์ ๋ฌํ๋ ์ญํ ์ ํด์. ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์์๋ ์ด๊ฒ ์์ฒญ ์ค์ํ๋ฐ, ์๋ชป๋ ๊ฐ๊ฒฉ ์ ๋ณด๊ฐ ๋ค์ด์ค๋ฉด ์์คํ ์ ์ฒด๊ฐ ๋ง๊ฐ์ง ์ ์๊ฑฐ๋ ์!
๐ก ์ฃผ์ ์ค๋ผํด ์๋ฃจ์ ๋ค| ์ค๋ผํด | ๋ฐฉ์ | ์ฅ์ | ๋จ์ |
|---|---|---|---|
| Chainlink | ํ์ค์ํ ๋ ธ๋ ๋คํธ์ํฌ | ์ ๋ขฐ์ฑ ๋์, ๋ค์ํ ๋ฐ์ดํฐ ์์ค | ๋น์ฉ ๋ฐ์, ์ ๋ฐ์ดํธ ์ง์ฐ |
| Uniswap TWAP | ์๊ฐ ๊ฐ์ค ํ๊ท ๊ฐ๊ฒฉ | ์กฐ์ ์ด๋ ค์, ๋ฌด๋ฃ | ์ ๋์ฑ ์์กด์ |
| Band Protocol | ํฌ๋ก์ค์ฒด์ธ ์ค๋ผํด | ๋น ๋ฅธ ์ ๋ฐ์ดํธ, ์ ๋ ด | ์๋์ ์ผ๋ก ๋ ๊ฒ์ฆ๋จ |
| Maker Oracle | ํ์ดํธ๋ฆฌ์คํธ ํผ๋ | ๋์ ๋ณด์์ฑ | ์ค์ํ ์ฐ๋ ค |
// ๋ค์ค ์ค๋ผํด ์ฌ์ฉ ์์ (์์ฌ์ฝ๋)
contract MultiOraclePrice {
IChainlink public chainlink;
IUniswapV3 public uniswap;
IBand public band;
uint256 public constant DEVIATION_THRESHOLD = 2e16; // 2%
function getPrice() public view returns (uint256) {
uint256 chainlinkPrice = chainlink.latestAnswer();
uint256 uniswapPrice = uniswap.getTWAP(3600); // 1์๊ฐ TWAP
uint256 bandPrice = band.getReferenceData("USD");
// ์ค์๊ฐ ์ฌ์ฉ (์ด์์น ์ ๊ฑฐ)
uint256 medianPrice = median(chainlinkPrice, uniswapPrice, bandPrice);
// ํธ์ฐจ ํ์ธ
require(
abs(chainlinkPrice - medianPrice) < DEVIATION_THRESHOLD &&
abs(uniswapPrice - medianPrice) < DEVIATION_THRESHOLD &&
abs(bandPrice - medianPrice) < DEVIATION_THRESHOLD,
"Price deviation too high"
);
return medianPrice;
}
function median(uint256 a, uint256 b, uint256 c)
internal pure returns (uint256)
{
if (a > b) {
if (b > c) return b;
else if (a > c) return c;
else return a;
} else {
if (a > c) return a;
else if (b > c) return c;
else return b;
}
}
}
์ด๋ฐ ๊ณต๊ฒฉ์ ๋ง๊ธฐ ์ํด TWAP(Time-Weighted Average Price)๋ ๋ค์ค ์ค๋ผํด์ ์ฌ์ฉํ๋ ๊ฒ ํ์์์!
๋ถ๋ถ ๋ด๋ณดํ ์คํ ์ด๋ธ์ฝ์ธ์์๋ ๋ด๋ณด๋ฅผ ์์ ํ๊ฒ ๊ด๋ฆฌํ๋ ์์คํ ์ด ํต์ฌ์ด์์. MakerDAO์ Vault ์์คํ ์ ์๋ก ๋ค์ด๋ณผ๊ฒ์:
๐ฆ Vault(๊ธ๊ณ ) ๋ฉ์ปค๋์ฆ2. ๋ด๋ณด ๊ฐ์น์ ์ผ์ ๋น์จ(์: 66%)๋งํผ DAI ๋ฐํ ๊ฐ๋ฅ
3. ๋ด๋ณด ๋น์จ(Collateralization Ratio)์ ํญ์ ์ ์งํด์ผ ํจ
4. ๋น์จ์ด ๋ฎ์์ง๋ฉด ์ฒญ์ฐ(Liquidation) ์ํ!
// Vault ๊ด๋ฆฌ ์์คํ
(์์ฌ์ฝ๋)
contract VaultManager {
struct Vault {
uint256 collateral; // ๋ด๋ณด๋ (ETH)
uint256 debt; // ๋น (DAI)
uint256 collateralRatio; // ๋ด๋ณด ๋น์จ
}
mapping(address => Vault) public vaults;
uint256 public constant MIN_COLLATERAL_RATIO = 150; // 150%
uint256 public constant LIQUIDATION_RATIO = 130; // 130%
uint256 public constant LIQUIDATION_PENALTY = 13; // 13%
function openVault(uint256 ethAmount) public payable {
require(msg.value == ethAmount, "Incorrect ETH amount");
vaults[msg.sender].collateral += ethAmount;
emit VaultOpened(msg.sender, ethAmount);
}
function mintDAI(uint256 daiAmount) public {
Vault storage vault = vaults[msg.sender];
// ์๋ก์ด ๋ด๋ณด ๋น์จ ๊ณ์ฐ
uint256 ethPrice = oracle.getETHPrice();
uint256 newDebt = vault.debt + daiAmount;
uint256 newRatio = (vault.collateral * ethPrice * 100) / newDebt;
require(newRatio >= MIN_COLLATERAL_RATIO, "Insufficient collateral");
vault.debt = newDebt;
vault.collateralRatio = newRatio;
DAI.mint(msg.sender, daiAmount);
emit DAIMinted(msg.sender, daiAmount, newRatio);
}
function liquidate(address user) public {
Vault storage vault = vaults[user];
uint256 ethPrice = oracle.getETHPrice();
uint256 currentRatio = (vault.collateral * ethPrice * 100) / vault.debt;
require(currentRatio < LIQUIDATION_RATIO, "Vault is safe");
// ์ฒญ์ฐ ์คํ
uint256 debtToCover = vault.debt;
uint256 collateralToSeize = vault.collateral;
uint256 penalty = (collateralToSeize * LIQUIDATION_PENALTY) / 100;
// ์ฒญ์ฐ์์๊ฒ ๋ณด์ (๋ด๋ณด + ํจ๋ํฐ)
vault.collateral = 0;
vault.debt = 0;
// DAI ์๊ฐ
DAI.burnFrom(msg.sender, debtToCover);
// ๋ด๋ณด ์ ์ก
payable(msg.sender).transfer(collateralToSeize);
emit VaultLiquidated(user, msg.sender, debtToCover, collateralToSeize);
}
}
์ฒญ์ฐ ์์คํ ์ ์ฒญ์ฐ ๋ด(Liquidation Bot)๋ค์ด 24/7 ๋ชจ๋ํฐ๋งํ๋ฉด์ ๋ด๋ณด ๋น์จ์ด ๋ฎ์ Vault๋ฅผ ์ฐพ์์ ์ฒญ์ฐํด์. ์ด๊ฒ ์์คํ ์ ์์ ์ฑ์ ์ ์งํ๋ ํต์ฌ ๋ฉ์ปค๋์ฆ์ด์ฃ ! ๐ค
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ์ถฉ๋ถํ ์ ๋์ฑ์ด ์์ด์ผ ์ ๋๋ก ์๋ํด์. ์ ๋์ฑ์ด ๋ถ์กฑํ๋ฉด ๊ฐ๊ฒฉ ๋ณ๋์ฑ์ด ์ปค์ง๊ณ , ์ฐจ์ต๊ฑฐ๋๋ ์ ๋๋ก ์ ๋๊ฑฐ๋ ์!
๐ ์ ๋์ฑ ์ธ์ผํฐ๋ธ ๋ฉ์ปค๋์ฆโข LP ํ ํฐ ์คํ ์ดํน
โข ๊ฑฐ๋ฒ๋์ค ํ ํฐ ๋ณด์
โข APY 100%+ ์ ๊ณต
โข ์ด๊ธฐ ์ ๋์ฑ ํ๋ณด
โข ๋ณธ๋ฉ ๋ฉ์ปค๋์ฆ
โข ์๊ตฌ์ ์ ๋์ฑ
โข ์ง์ ๊ฐ๋ฅ์ฑ ๋์
โข ์ฅ๊ธฐ์ ์์ ์ฑ
// ์ ๋์ฑ ๋ง์ด๋ ์ปจํธ๋ํธ (์์ฌ์ฝ๋)
contract LiquidityMining {
IERC20 public lpToken;
IERC20 public rewardToken;
mapping(address => uint256) public stakedBalance;
mapping(address => uint256) public rewardDebt;
uint256 public rewardPerBlock = 1e18; // ๋ธ๋ก๋น 1 ํ ํฐ
uint256 public lastRewardBlock;
uint256 public accRewardPerShare;
function stake(uint256 amount) public {
updatePool();
if (stakedBalance[msg.sender] > 0) {
// ๊ธฐ์กด ๋ณด์ ์ง๊ธ
uint256 pending = (stakedBalance[msg.sender] * accRewardPerShare / 1e12)
- rewardDebt[msg.sender];
rewardToken.transfer(msg.sender, pending);
}
lpToken.transferFrom(msg.sender, address(this), amount);
stakedBalance[msg.sender] += amount;
rewardDebt[msg.sender] = stakedBalance[msg.sender] * accRewardPerShare / 1e12;
emit Staked(msg.sender, amount);
}
function updatePool() public {
if (block.number <= lastRewardBlock) return;
uint256 lpSupply = lpToken.balanceOf(address(this));
if (lpSupply == 0) {
lastRewardBlock = block.number;
return;
}
uint256 blocks = block.number - lastRewardBlock;
uint256 reward = blocks * rewardPerBlock;
accRewardPerShare += (reward * 1e12) / lpSupply;
lastRewardBlock = block.number;
}
}
์ฌ๋ฅ๋ท ๊ฐ์ ํ๋ซํผ์์๋ ๋ธ๋ก์ฒด์ธ ๊ฐ๋ฐ์๋ค์ด ์ด๋ฐ ์ ๋์ฑ ๋ฉ์ปค๋์ฆ์ ์ค๊ณํ๊ณ ๊ตฌํํ๋ ์ฌ๋ฅ์ ๊ณต์ ํ๊ณ ์์ด์! DeFi ํ๋ก์ ํธ ์ปจ์คํ ์ด๋ ์ค๋งํธ ์ปจํธ๋ํธ ๊ฐ๋ฐ ๊ฐ์ ์ ๋ฌธ ์๋น์ค๋ฅผ ์ฐพ์ ์ ์์ฃ ใ ใ
๐ฎ ๊ฒ์ ์ด๋ก ๊ณผ ์ธ์ผํฐ๋ธ ์ค๊ณ
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ์ฑ๊ณต์ ๊ฒฐ๊ตญ ์ฌ๋๋ค์ ํ๋์ ์ฌ๋ฐ๋ฅธ ๋ฐฉํฅ์ผ๋ก ์ ๋ํ ์ ์๋๋์ ๋ฌ๋ ค์์ด์. ๊ฒ์ ์ด๋ก ์ ํ์ฉํ ์ธ์ผํฐ๋ธ ์ค๊ณ๊ฐ ํต์ฌ์ด์ฃ ! ๐ฏ
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ๋ด์ฌ ๊ท ํ(Nash Equilibrium)์ ๋ง๋ค์ด์ผ ํด์. ์ฆ, ๋ชจ๋ ์ฐธ์ฌ์๊ฐ ํ์ฌ ์ ๋ต์ ์ ์งํ๋ ๊ฒ ์ต์ ์ธ ์ํ๋ฅผ ๋ง๋๋ ๊ฑฐ์ฃ !
๐ ์ฐธ์ฌ์๋ณ ์ธ์ผํฐ๋ธ ๊ตฌ์กฐ| ์ฐธ์ฌ์ | ํ๋ | ์ธ์ผํฐ๋ธ | ๊ธฐ๋ ๊ฒฐ๊ณผ |
|---|---|---|---|
| ์ฐจ์ต๊ฑฐ๋์ | ๊ฐ๊ฒฉ ์ฐจ์ด ์ด์ฉ | ์ฆ๊ฐ์ ์ธ ์์ต | ๊ฐ๊ฒฉ ์์ ํ |
| LP ์ ๊ณต์ | ์ ๋์ฑ ๊ณต๊ธ | ์์๋ฃ + ๋ณด์ | ๊ฑฐ๋ ํ์ฑํ |
| ์คํ ์ด์ปค | ์ฅ๊ธฐ ๋ณด์ | ์คํ ์ดํน ๋ณด์ | ๊ณต๊ธ ๊ฐ์ |
| ๋ณธ๋ | ํ ์ธ ๊ตฌ๋งค | ํ ์ธ ํํ | ํ๋กํ ์ฝ ์์ฐ ์ฆ๊ฐ |
โข LP ์ ๊ณต์๋ค์ด ์ถฉ๋ถํ ์ ๋์ฑ ๊ณต๊ธ
โข ์คํ ์ด์ปค๋ค์ด ์ฅ๊ธฐ ๋ณด์ ๋ก ๋ณ๋์ฑ ์ํ
โข ๋ณธ๋๋ค์ด ํ๋กํ ์ฝ ์์ฐ ๊ฐํ
โข ๋ชจ๋๊ฐ win-win! ๐
โข ์ ๋์ฑ ๊ณ ๊ฐ โ ๊ฐ๊ฒฉ ๊ธ๋ณ
โข ์ฐจ์ต๊ฑฐ๋ ๋ถ๊ฐ๋ฅ โ ๋ํ๊น
โข ์ ์ํ ์์ โ ์์คํ ๋ถ๊ดด
โข ๋ชจ๋๊ฐ lose-lose... ๐ฑ
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ์์ ์ฑ์ ์ํ์ ์ผ๋ก ๋ถ์ํ ์ ์์ด์. ๊ฐ๋จํ ๋ชจ๋ธ์ ๋ง๋ค์ด๋ณผ๊ฒ์:
// ์คํ
์ด๋ธ์ฝ์ธ ๊ฐ๊ฒฉ ๋์ญํ ๋ชจ๋ธ (Python ์คํ์ผ ์์ฌ์ฝ๋)
def price_dynamics(t, state, params):
"""
state = [price, supply, demand, confidence]
params = [alpha, beta, gamma, delta]
"""
price, supply, demand, confidence = state
alpha, beta, gamma, delta = params
# ๊ฐ๊ฒฉ ๋ณํ์จ
dprice_dt = alpha * (demand - supply) / supply
# ๊ณต๊ธ ์กฐ์ (์๊ณ ๋ฆฌ์ฆ)
if price > 1.0:
dsupply_dt = beta * (price - 1.0) * supply
else:
dsupply_dt = -beta * (1.0 - price) * supply
# ์์ ๋ณํ (์ ๋ขฐ๋ ์์กด)
ddemand_dt = gamma * confidence * (1.0 - price)
# ์ ๋ขฐ๋ ๋ณํ
dconfidence_dt = delta * (1.0 - abs(price - 1.0)) - 0.01
return [dprice_dt, dsupply_dt, ddemand_dt, dconfidence_dt]
# ์๋ฎฌ๋ ์ด์
์คํ
initial_state = [1.0, 1000000, 1000000, 0.8] # ์ด๊ธฐ ์ํ
params = [0.5, 0.3, 0.2, 0.1] # ํ๋ผ๋ฏธํฐ
time_span = (0, 100) # 100์ผ ์๋ฎฌ๋ ์ด์
# ์์ ์ฑ ๋ถ์
# 1. ํํ์ ์ฐพ๊ธฐ
# 2. ์ผ์ฝ๋น์ ํ๋ ฌ ๊ณ์ฐ
# 3. ๊ณ ์ ๊ฐ ๋ถ์
# 4. ์์ ์ฑ ํ๋จ
์ด๋ฐ ์ํ์ ๋ชจ๋ธ๋ง์ ํตํด ์์คํ ์ ์์ ์ฑ์ ์ฌ์ ์ ๊ฒ์ฆํ ์ ์์ด์. ์ค์ ๋ก ๋ง์ ํ๋ก์ ํธ๋ค์ด ์ถ์ ์ ์ ์ด๋ฐ ์๋ฎฌ๋ ์ด์ ์ ๋๋ ค๋ณด์ฃ ! ๐ฌ
๐ ๋ณด์๊ณผ ๋ฆฌ์คํฌ ๊ด๋ฆฌ
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ๋ณต์กํ ์์คํ ์ด๊ธฐ ๋๋ฌธ์ ๋ณด์์ด ์ ๋ง์ ๋ง ์ค์ํด์! ํ ๊ณณ์์ ๋ฌธ์ ๊ฐ ์๊ธฐ๋ฉด ์ ์ฒด ์์คํ ์ด ๋ฌด๋์ง ์ ์๊ฑฐ๋ ์ ใ ใ
โข 2016๋ DAO ํดํน์ ์์ธ
โข 6์ฒ๋ง ๋ฌ๋ฌ ํผํด ๋ฐ์
๋ฐฉ์ด ๋ฐฉ๋ฒ:
// ๋ฆฌ์ํธ๋ฐ์ ๋ฐฉ์ด ํจํด
contract SafeVault {
mapping(address => uint256) public balances;
bool private locked;
modifier noReentrant() {
require(!locked, "No reentrancy");
locked = true;
_;
locked = false;
}
function withdraw(uint256 amount) public noReentrant {
require(balances[msg.sender] >= amount, "Insufficient balance");
// Checks-Effects-Interactions ํจํด
// 1. Checks: ์กฐ๊ฑด ํ์ธ (์์์ ์๋ฃ)
// 2. Effects: ์ํ ๋ณ๊ฒฝ (๋จผ์ !)
balances[msg.sender] -= amount;
// 3. Interactions: ์ธ๋ถ ํธ์ถ (๋์ค์!)
(bool success, ) = msg.sender.call{value: amount}("");
require(success, "Transfer failed");
}
}
2. ์ค๋ผํด ์กฐ์โข TWAP ์ฌ์ฉ์ผ๋ก ๋ฐฉ์ด
โข ๋ค์ค ์ค๋ผํด ๊ฒ์ฆ ํ์
โข ๊ฐ๊ฒฉ ํธ์ฐจ ์๊ณ๊ฐ ์ค์
โข ์ ์์ ์ธ ์ ์ ํต๊ณผ
โข ์์คํ ํ๋ผ๋ฏธํฐ ์กฐ์
โข ํ์๋ฝ(Timelock) ํ์!
// ํ์๋ฝ ๊ฑฐ๋ฒ๋์ค
contract TimelockGovernance {
uint256 public constant DELAY = 2 days;
struct Proposal {
address target;
bytes data;
uint256 executeTime;
bool executed;
}
mapping(uint256 => Proposal) public proposals;
uint256 public proposalCount;
function propose(address target, bytes memory data) public {
require(governanceToken.balanceOf(msg.sender) > PROPOSAL_THRESHOLD);
uint256 proposalId = proposalCount++;
proposals[proposalId] = Proposal({
target: target,
data: data,
executeTime: block.timestamp + DELAY,
executed: false
});
emit ProposalCreated(proposalId, target, data);
}
function execute(uint256 proposalId) public {
Proposal storage proposal = proposals[proposalId];
require(!proposal.executed, "Already executed");
require(block.timestamp >= proposal.executeTime, "Timelock not expired");
proposal.executed = true;
(bool success, ) = proposal.target.call(proposal.data);
require(success, "Execution failed");
emit ProposalExecuted(proposalId);
}
}
๊ธ๊ฒฉํ ์์ฅ ๋ณ๋์ด๋ ๊ณต๊ฒฉ ์ํฉ์์ ์์คํ ์ ์ผ์ ์ ์ง์ํค๋ ์์ ์ฅ์น์์. ์ฃผ์์์ฅ์ ์ํท ๋ธ๋ ์ด์ปค์ ๋น์ทํ ๊ฐ๋ ์ด์ฃ !
// ์ํท ๋ธ๋ ์ด์ปค ๊ตฌํ
contract CircuitBreaker {
bool public paused;
address public guardian;
uint256 public constant MAX_PRICE_DEVIATION = 10e16; // 10%
uint256 public constant MAX_VOLUME_SPIKE = 5; // 5๋ฐฐ
uint256 public lastPrice;
uint256 public lastVolume;
uint256 public lastCheckTime;
modifier whenNotPaused() {
require(!paused, "System paused");
_;
}
modifier onlyGuardian() {
require(msg.sender == guardian, "Not guardian");
_;
}
function checkAndPause() internal {
uint256 currentPrice = oracle.getPrice();
uint256 currentVolume = getTotalVolume();
// ๊ฐ๊ฒฉ ๊ธ๋ณ ์ฒดํฌ
uint256 priceDeviation = abs(currentPrice - lastPrice) * 1e18 / lastPrice;
if (priceDeviation > MAX_PRICE_DEVIATION) {
paused = true;
emit CircuitBreakerTriggered("Price deviation", priceDeviation);
return;
}
// ๊ฑฐ๋๋ ๊ธ์ฆ ์ฒดํฌ
if (currentVolume > lastVolume * MAX_VOLUME_SPIKE) {
paused = true;
emit CircuitBreakerTriggered("Volume spike", currentVolume);
return;
}
lastPrice = currentPrice;
lastVolume = currentVolume;
lastCheckTime = block.timestamp;
}
function emergencyPause() external onlyGuardian {
paused = true;
emit EmergencyPause(msg.sender);
}
function unpause() external onlyGuardian {
require(block.timestamp > lastCheckTime + 1 hours, "Too soon");
paused = false;
emit Unpause(msg.sender);
}
}
โข ๊ฑฐ๋๋์ด ํ์์ 5๋ฐฐ ์ด์
โข ์ค๋ผํด ๊ฐ๊ฒฉ ํธ์ฐจ ๊ณผ๋ค
โข ์ฒญ์ฐ ํญ์ฆ ๊ฐ์ง
โข ๊ฐ๋์ธ์ ์๋ ๊ฐ์
์ค๋งํธ ์ปจํธ๋ํธ ๋ฐฐํฌ ์ ์ ์ ๋ฌธ ๋ณด์ ๊ฐ์ฌ๋ฅผ ๋ฐ๋ ๊ฒ ํ์์์! ์ฃผ์ ๊ฐ์ฌ ์ ์ฒด๋ค:
| ๊ฐ์ฌ ์ ์ฒด | ํน์ง | ๋น์ฉ | ๊ธฐ๊ฐ |
|---|---|---|---|
| Trail of Bits | ํ์ ๊ฒ์ฆ ์ ๋ฌธ | $50k~$200k | 4~8์ฃผ |
| OpenZeppelin | DeFi ์ ๋ฌธ, ์ ๋ขฐ๋ ๋์ | $40k~$150k | 3~6์ฃผ |
| CertiK | AI ๊ธฐ๋ฐ ๋ถ์ | $30k~$100k | 2~4์ฃผ |
| Quantstamp | ์๋ํ ๋๊ตฌ ์ ๊ณต | $25k~$80k | 2~4์ฃผ |
์ฌ๋ฅ๋ท์์๋ ๋ธ๋ก์ฒด์ธ ๋ณด์ ์ ๋ฌธ๊ฐ๋ค์ด ์ค๋งํธ ์ปจํธ๋ํธ ๊ฐ์ฌ ์๋น์ค๋ฅผ ์ ๊ณตํ๊ณ ์์ด์! ๋ํ ๊ฐ์ฌ ์ ์ฒด๋ณด๋ค ์ ๋ ดํ๋ฉด์๋ ์ ๋ฌธ์ ์ธ ๊ฒํ ๋ฅผ ๋ฐ์ ์ ์์ฃ ใ ใ
๐ ์ค์ ๊ตฌํ ๊ฐ์ด๋
์ด์ ์ค์ ๋ก ๊ฐ๋จํ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ๊ตฌํํด๋ณผ๊ฒ์! ๋ฌผ๋ก ์ค์ ํ๋ก๋์ ๋ ๋ฒจ์ ํจ์ฌ ๋ณต์กํ์ง๋ง, ํต์ฌ ๊ฐ๋ ์ ์ดํดํ๋ ๋ฐ๋ ์ถฉ๋ถํ ๊ฑฐ์์ ๐ป
์ฐ๋ฆฌ๊ฐ ๋ง๋ค ์์คํ ์ ๊ตฌ์กฐ๋ ์ด๋์:
2. VolatileToken.sol - ๊ฑฐ๋ฒ๋์ค/๋ณ๋์ฑ ํ ํฐ
3. Treasury.sol - ๋ด๋ณด ๊ด๋ฆฌ
4. Oracle.sol - ๊ฐ๊ฒฉ ํผ๋
5. Minter.sol - ๋ฏผํ /์๊ฐ ๋ก์ง
6. Governance.sol - ๊ฑฐ๋ฒ๋์ค
// 1. StableCoin.sol - ๊ธฐ๋ณธ ERC20 ํ ํฐ
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract StableCoin is ERC20, Ownable {
address public minter;
constructor() ERC20("Algorithmic Stable USD", "AUSD") {}
modifier onlyMinter() {
require(msg.sender == minter, "Not minter");
_;
}
function setMinter(address _minter) external onlyOwner {
minter = _minter;
}
function mint(address to, uint256 amount) external onlyMinter {
_mint(to, amount);
}
function burn(address from, uint256 amount) external onlyMinter {
_burn(from, amount);
}
}
// 2. VolatileToken.sol - ๋ณ๋์ฑ ํ ํฐ
contract VolatileToken is ERC20, Ownable {
address public minter;
constructor() ERC20("Algorithmic Share", "ASHARE") {
_mint(msg.sender, 1000000 * 10**18); // ์ด๊ธฐ ๊ณต๊ธ๋
}
modifier onlyMinter() {
require(msg.sender == minter, "Not minter");
_;
}
function setMinter(address _minter) external onlyOwner {
minter = _minter;
}
function mint(address to, uint256 amount) external onlyMinter {
_mint(to, amount);
}
function burn(address from, uint256 amount) external onlyMinter {
_burn(from, amount);
}
}
// 3. Oracle.sol - ๊ฐ๋จํ ๊ฐ๊ฒฉ ์ค๋ผํด
contract SimpleOracle is Ownable {
uint256 public stablePrice;
uint256 public volatilePrice;
uint256 public lastUpdate;
address public updater;
modifier onlyUpdater() {
require(msg.sender == updater, "Not updater");
_;
}
function setUpdater(address _updater) external onlyOwner {
updater = _updater;
}
function updatePrices(uint256 _stablePrice, uint256 _volatilePrice)
external onlyUpdater
{
stablePrice = _stablePrice;
volatilePrice = _volatilePrice;
lastUpdate = block.timestamp;
emit PricesUpdated(_stablePrice, _volatilePrice);
}
function getStablePrice() external view returns (uint256) {
require(block.timestamp - lastUpdate < 1 hours, "Price too old");
return stablePrice;
}
function getVolatilePrice() external view returns (uint256) {
require(block.timestamp - lastUpdate < 1 hours, "Price too old");
return volatilePrice;
}
event PricesUpdated(uint256 stablePrice, uint256 volatilePrice);
}
// 4. Minter.sol - ํต์ฌ ๋ฏผํ
/์๊ฐ ๋ก์ง
contract Minter is Ownable {
StableCoin public stable;
VolatileToken public volatile;
SimpleOracle public oracle;
uint256 public constant TARGET_PRICE = 1e18; // 1 USD
uint256 public constant MINT_FEE = 50; // 0.5%
uint256 public constant BURN_FEE = 50; // 0.5%
bool public paused;
constructor(
address _stable,
address _volatile,
address _oracle
) {
stable = StableCoin(_stable);
volatile = VolatileToken(_volatile);
oracle = SimpleOracle(_oracle);
}
modifier whenNotPaused() {
require(!paused, "Paused");
_;
}
// ์คํ
์ด๋ธ์ฝ์ธ ๋ฏผํ
(๊ฐ๊ฒฉ์ด ๋์ ๋)
function mintStable(uint256 volatileAmount) external whenNotPaused {
uint256 stablePrice = oracle.getStablePrice();
require(stablePrice >= TARGET_PRICE, "Price too low");
// ๋ณ๋์ฑ ํ ํฐ ๋ฐ๊ธฐ
volatile.transferFrom(msg.sender, address(this), volatileAmount);
// ์คํ
์ด๋ธ์ฝ์ธ ๋ฐํ๋ ๊ณ์ฐ
uint256 volatilePrice = oracle.getVolatilePrice();
uint256 stableAmount = (volatileAmount * volatilePrice) / TARGET_PRICE;
// ์์๋ฃ ์ฐจ๊ฐ
uint256 fee = (stableAmount * MINT_FEE) / 10000;
uint256 netAmount = stableAmount - fee;
// ์คํ
์ด๋ธ์ฝ์ธ ๋ฐํ
stable.mint(msg.sender, netAmount);
emit StableMinted(msg.sender, volatileAmount, netAmount);
}
// ์คํ
์ด๋ธ์ฝ์ธ ์๊ฐ (๊ฐ๊ฒฉ์ด ๋ฎ์ ๋)
function burnStable(uint256 stableAmount) external whenNotPaused {
uint256 stablePrice = oracle.getStablePrice();
require(stablePrice <= TARGET_PRICE, "Price too high");
// ์คํ
์ด๋ธ์ฝ์ธ ์๊ฐ
stable.transferFrom(msg.sender, address(this), stableAmount);
stable.burn(address(this), stableAmount);
// ๋ณ๋์ฑ ํ ํฐ ์ง๊ธ๋ ๊ณ์ฐ
uint256 volatilePrice = oracle.getVolatilePrice();
uint256 volatileAmount = (stableAmount * TARGET_PRICE) / volatilePrice;
// ์์๋ฃ ์ฐจ๊ฐ
uint256 fee = (volatileAmount * BURN_FEE) / 10000;
uint256 netAmount = volatileAmount - fee;
// ๋ณ๋์ฑ ํ ํฐ ์ง๊ธ
volatile.transfer(msg.sender, netAmount);
emit StableBurned(msg.sender, stableAmount, netAmount);
}
function pause() external onlyOwner {
paused = true;
}
function unpause() external onlyOwner {
paused = false;
}
event StableMinted(address indexed user, uint256 volatileIn, uint256 stableOut);
event StableBurned(address indexed user, uint256 stableIn, uint256 volatileOut);
}
์ค๋งํธ ์ปจํธ๋ํธ๋ ๋ฐฐํฌ ์ ์ ์ฒ ์ ํ ํ ์คํธ๊ฐ ํ์์์! Hardhat์ด๋ Foundry๋ฅผ ์ฌ์ฉํ ํ ์คํธ ์์:
// test/Minter.test.js (Hardhat + Chai)
const { expect } = require("chai");
const { ethers } = require("hardhat");
describe("Algorithmic Stablecoin", function() {
let stable, volatile, oracle, minter;
let owner, user1, user2;
beforeEach(async function() {
[owner, user1, user2] = await ethers.getSigners();
// ์ปจํธ๋ํธ ๋ฐฐํฌ
const StableCoin = await ethers.getContractFactory("StableCoin");
stable = await StableCoin.deploy();
const VolatileToken = await ethers.getContractFactory("VolatileToken");
volatile = await VolatileToken.deploy();
const SimpleOracle = await ethers.getContractFactory("SimpleOracle");
oracle = await SimpleOracle.deploy();
const Minter = await ethers.getContractFactory("Minter");
minter = await Minter.deploy(stable.address, volatile.address, oracle.address);
// ๊ถํ ์ค์
await stable.setMinter(minter.address);
await volatile.setMinter(minter.address);
await oracle.setUpdater(owner.address);
// ์ด๊ธฐ ๊ฐ๊ฒฉ ์ค์
await oracle.updatePrices(
ethers.utils.parseEther("1.0"), // stable = $1
ethers.utils.parseEther("10.0") // volatile = $10
);
// ํ
์คํธ์ฉ ํ ํฐ ๋ถ๋ฐฐ
await volatile.transfer(user1.address, ethers.utils.parseEther("1000"));
});
describe("Minting", function() {
it("๊ฐ๊ฒฉ์ด 1๋ฌ๋ฌ ์ด์์ผ ๋ ๋ฏผํ
๊ฐ๋ฅ", async function() {
// ๊ฐ๊ฒฉ์ 1.1๋ฌ๋ฌ๋ก ์ค์
await oracle.updatePrices(
ethers.utils.parseEther("1.1"),
ethers.utils.parseEther("10.0")
);
// 100 ๋ณ๋์ฑ ํ ํฐ์ผ๋ก ๋ฏผํ
const volatileAmount = ethers.utils.parseEther("100");
await volatile.connect(user1).approve(minter.address, volatileAmount);
await expect(
minter.connect(user1).mintStable(volatileAmount)
).to.emit(minter, "StableMinted");
// ์คํ
์ด๋ธ์ฝ์ธ ์์ก ํ์ธ
const stableBalance = await stable.balanceOf(user1.address);
expect(stableBalance).to.be.gt(0);
});
it("๊ฐ๊ฒฉ์ด 1๋ฌ๋ฌ ๋ฏธ๋ง์ผ ๋ ๋ฏผํ
๋ถ๊ฐ", async function() {
// ๊ฐ๊ฒฉ์ 0.9๋ฌ๋ฌ๋ก ์ค์
await oracle.updatePrices(
ethers.utils.parseEther("0.9"),
ethers.utils.parseEther("10.0")
);
const volatileAmount = ethers.utils.parseEther("100");
await volatile.connect(user1).approve(minter.address, volatileAmount);
await expect(
minter.connect(user1).mintStable(volatileAmount)
).to.be.revertedWith("Price too low");
});
});
describe("Burning", function() {
beforeEach(async function() {
// ๋จผ์ ์คํ
์ด๋ธ์ฝ์ธ ๋ฏผํ
await oracle.updatePrices(
ethers.utils.parseEther("1.1"),
ethers.utils.parseEther("10.0")
);
const volatileAmount = ethers.utils.parseEther("100");
await volatile.connect(user1).approve(minter.address, volatileAmount);
await minter.connect(user1).mintStable(volatileAmount);
});
it("๊ฐ๊ฒฉ์ด 1๋ฌ๋ฌ ๋ฏธ๋ง์ผ ๋ ์๊ฐ ๊ฐ๋ฅ", async function() {
// ๊ฐ๊ฒฉ์ 0.9๋ฌ๋ฌ๋ก ์ค์
await oracle.updatePrices(
ethers.utils.parseEther("0.9"),
ethers.utils.parseEther("10.0")
);
const stableBalance = await stable.balanceOf(user1.address);
await stable.connect(user1).approve(minter.address, stableBalance);
await expect(
minter.connect(user1).burnStable(stableBalance)
).to.emit(minter, "StableBurned");
});
});
describe("Circuit Breaker", function() {
it("์ผ์์ ์ง ์ ๊ฑฐ๋ ๋ถ๊ฐ", async function() {
await minter.pause();
const volatileAmount = ethers.utils.parseEther("100");
await volatile.connect(user1).approve(minter.address, volatileAmount);
await expect(
minter.connect(user1).mintStable(volatileAmount)
).to.be.revertedWith("Paused");
});
});
});
โข ๊ฐ๊ฒฉ ์กฐ๊ฑด ๊ฒ์ฆ
โข ๊ถํ ๊ด๋ฆฌ
โข ์์๋ฃ ๊ณ์ฐ
โข ์ค๋ฒํ๋ก์ฐ/์ธ๋ํ๋ก์ฐ
โข ๋ฆฌ์ํธ๋ฐ์ ๋ฐฉ์ด
โข ์ํท ๋ธ๋ ์ด์ปค
โข ๊ฐ์ค ์ต์ ํ
์ค์ ๋ฉ์ธ๋ท ๋ฐฐํฌ ์ ๊ณ ๋ ค์ฌํญ๋ค:
2. ํ ์คํธ๋ท ๊ฒ์ฆ: Goerli, Sepolia์์ ์ถฉ๋ถํ ํ ์คํธ
3. ๋ฒ๊ทธ ๋ฐ์ดํฐ: Immunefi ๋ฑ์ ํ๋ก๊ทธ๋จ ๋ฑ๋ก
4. ๋ฉํฐ์๊ทธ ์ง๊ฐ: ์ต์ 3/5 ๋ฉํฐ์๊ทธ๋ก ๊ด๋ฆฌ
5. ํ์๋ฝ: ๋ชจ๋ ์ค์ ๋ณ๊ฒฝ์ฌํญ์ 48์๊ฐ ์ง์ฐ
6. ๋ชจ๋ํฐ๋ง: 24/7 ์์คํ ๋ชจ๋ํฐ๋ง ๊ตฌ์ถ
7. ๋น์ ๋์: ์ธ์๋ํธ ๋์ ํ๋ ์ด๋ถ ์ค๋น
8. ๋ณดํ: Nexus Mutual ๋ฑ DeFi ๋ณดํ ๊ฐ์
// ๋ฐฐํฌ ์คํฌ๋ฆฝํธ (Hardhat)
async function main() {
console.log("Deploying Algorithmic Stablecoin...");
// 1. ํ ํฐ ๋ฐฐํฌ
const StableCoin = await ethers.getContractFactory("StableCoin");
const stable = await StableCoin.deploy();
await stable.deployed();
console.log("StableCoin deployed to:", stable.address);
const VolatileToken = await ethers.getContractFactory("VolatileToken");
const volatile = await VolatileToken.deploy();
await volatile.deployed();
console.log("VolatileToken deployed to:", volatile.address);
// 2. ์ค๋ผํด ๋ฐฐํฌ
const Oracle = await ethers.getContractFactory("SimpleOracle");
const oracle = await Oracle.deploy();
await oracle.deployed();
console.log("Oracle deployed to:", oracle.address);
// 3. Minter ๋ฐฐํฌ
const Minter = await ethers.getContractFactory("Minter");
const minter = await Minter.deploy(
stable.address,
volatile.address,
oracle.address
);
await minter.deployed();
console.log("Minter deployed to:", minter.address);
// 4. ๊ถํ ์ค์
await stable.setMinter(minter.address);
await volatile.setMinter(minter.address);
// 5. ๋ฉํฐ์๊ทธ๋ก ์์ ๊ถ ์ด์
const MULTISIG_ADDRESS = "0x...";
await stable.transferOwnership(MULTISIG_ADDRESS);
await volatile.transferOwnership(MULTISIG_ADDRESS);
await oracle.transferOwnership(MULTISIG_ADDRESS);
await minter.transferOwnership(MULTISIG_ADDRESS);
console.log("Deployment complete!");
console.log("Ownership transferred to:", MULTISIG_ADDRESS);
// 6. ๊ฒ์ฆ์ฉ ์ ๋ณด ์ ์ฅ
const deployment = {
network: network.name,
stable: stable.address,
volatile: volatile.address,
oracle: oracle.address,
minter: minter.address,
multisig: MULTISIG_ADDRESS,
timestamp: new Date().toISOString()
};
fs.writeFileSync(
`deployments/${network.name}.json`,
JSON.stringify(deployment, null, 2)
);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
๐ ์ค์ ํ๋ก์ ํธ ์ฌ๋ก ๋ถ์
์ด๋ก ๋ง ์์์๋ ๋ถ์กฑํ์ฃ ! ์ค์ ๋ก ์ด์๋๊ณ ์๋ ํ๋ก์ ํธ๋ค์ ๋ถ์ํด๋ณด๋ฉด์ ๋ฐฐ์๋ด์ ๐
FRAX๋ ํ์ฌ ๊ฐ์ฅ ์ฑ๊ณต์ ์ธ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ ์ค ํ๋์์. ์๊ฐ์ด์ก 10์ต ๋ฌ๋ฌ ์ด์์ ์ ์งํ๋ฉด์ ์์ ์ ์ผ๋ก ์ด์๋๊ณ ์์ฃ !
๐ฏ FRAX์ ์ฑ๊ณต ์์ธ:โข 100% ์๊ณ ๋ฆฌ์ฆ์ด ์๋ ํ์ด๋ธ๋ฆฌ๋ ์ ๊ทผ
โข ์์ฅ ์ํฉ์ ๋ฐ๋ผ ๋ด๋ณด ๋น์จ ๋์ ์กฐ์
โข ํ์ฌ ์ฝ 92% ๋ด๋ณด ๋น์จ ์ ์ง
2. ๋ค์ํ ์์ต ๋ฉ์ปค๋์ฆ
โข Curve์์ ๋์ ์ ๋์ฑ ์ ๊ณต
โข Frax Lend๋ก ๋์ถ ์๋น์ค
โข frxETH๋ก ์ด๋๋ฆฌ์ ์คํ ์ดํน ์ง์ถ
3. ๊ฐ๋ ฅํ ์ปค๋ฎค๋ํฐ
โข ํ๋ฐํ ๊ฑฐ๋ฒ๋์ค ์ฐธ์ฌ
โข ํฌ๋ช ํ ์ด์
โข ์ง์์ ์ธ ํ์
| ์งํ | FRAX | UST (๋ถ๊ดด ์ ) |
|---|---|---|
| ์๊ฐ์ด์ก | $1.2B | $18B |
| ๋ด๋ณด ๋น์จ | ~92% | 0% |
| ์ต๋ ๋ํ๊น | $0.98 | $0.08 |
| ์ด์ ๊ธฐ๊ฐ | 3๋ + | 2๋ |
Iron Finance๋ 2021๋ 6์์ ๋จ ํ๋ฃจ ๋ง์ ๋ถ๊ดดํ ์ฌ๋ก์์. TITAN ํ ํฐ์ด $60์์ $0.000001๋ก ํญ๋ฝํ์ฃ ๐ฑ
๐ ์คํจ ์์ธ ๋ถ์:โข ๋๊ท๋ชจ ๋งค๋ ์์
โข TITAN ๊ฐ๊ฒฉ ๊ธ๋ฝ
โข ๋ ๋ง์ TITAN ๋ฐํ ํ์
โข ํ์ดํผ์ธํ๋ ์ด์ ๋ฐ์
2. ์ ๋์ฑ ๋ถ์กฑ
โข TITAN์ ์ ๋์ฑ์ด ์ถฉ๋ถํ์ง ์์
โข ํฐ ๊ฑฐ๋์๋ ๊ฐ๊ฒฉ ๊ธ๋ณ
โข ์ฐจ์ต๊ฑฐ๋ ๋ถ๊ฐ๋ฅ
3. ์ ๋ขฐ ์์ค
โข ๋งํฌ ํ๋ฐ์ ํฌ์ ์์ค ๊ณต๊ฐ
โข ๋ฏธ๋์ด ์ฃผ๋ชฉ
โข ํจ๋ ๊ฐ์ํ
Iron Finance ์ฌํ๋ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ์ทจ์ฝ์ฑ์ ์ฌ์คํ ๋ณด์ฌ์คฌ์ด์. ํนํ ์ ๋์ฑ๊ณผ ์ ๋ขฐ๊ฐ ์ผ๋ง๋ ์ค์ํ์ง ์ ์ ์์ฃ !
๐ฎ ๋ฏธ๋ ์ ๋ง๊ณผ ๋ฐ์ ๋ฐฉํฅ
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ์์ง ์งํ ์ค์ด์์! ์์ผ๋ก ์ด๋ค ๋ฐฉํฅ์ผ๋ก ๋ฐ์ ํ ์ง ์ดํด๋ณผ๊ฒ์ ๐
๋จธ์ ๋ฌ๋์ ํ์ฉํด์ ์์ฅ ์ํฉ์ ์์ธกํ๊ณ ์ ์ ์ ์ผ๋ก ๋์ํ๋ ์์คํ ์ด ๊ฐ๋ฐ๋๊ณ ์์ด์:
โข ์๊ธฐ ์ํฉ ์กฐ๊ธฐ ๊ฐ์ง
โข ์ต์ ์ ํ๋ผ๋ฏธํฐ ์๋ ์กฐ์
โข ๋ฆฌ์คํฌ ์์ธก ๋ชจ๋ธ๋ง
์ฌ๋ฌ ๋ธ๋ก์ฒด์ธ์์ ๋์์ ์๋ํ๋ ์คํ ์ด๋ธ์ฝ์ธ:
โข ์ฒด์ธ ๊ฐ ๋ฉ์์ง ์ ์ก
โข ํตํฉ๋ ์ ๋์ฑ
โข ์ํํ ๋ธ๋ฆฟ์ง
โข ๋ฒ์ฉ ํฌ๋ก์ค์ฒด์ธ
โข ๋ณด์์ฑ ๊ฐํ
โข ๋ค์ํ ์ฒด์ธ ์ง์
RWA(Real World Assets)์ ๊ฒฐํฉํ ์คํ ์ด๋ธ์ฝ์ธ:
โข ๊ตญ์ฑ ๋ด๋ณด ํ์ฉ
โข ์ํ ์ ๋ฌผ ์ฐ๊ณ
โข ๋ ์์ ์ ์ธ ๊ฐ์น ๋ณด์ฅ
๊ฐ๊ตญ ์ ๋ถ๊ฐ ์คํ ์ด๋ธ์ฝ์ธ ๊ท์ ๋ฅผ ๊ฐํํ๊ณ ์์ด์. ์ด๊ฒ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ๋ฏธ์น๋ ์ํฅ:
| ์ง์ญ | ๊ท์ ๋ฐฉํฅ | ์ํฅ |
|---|---|---|
| ๋ฏธ๊ตญ | ๋ด๋ณด ์๋ฌดํ ๊ฒํ | ์์ ์๊ณ ๋ฆฌ์ฆ ๋ฐฉ์ ์ด๋ ค์ |
| ์ ๋ฝ | MiCA ๊ท์ ์ํ | ๋ผ์ด์ ์ค ํ์ |
| ์์์ | ๊ตญ๊ฐ๋ณ ์์ด | ์ฑ๊ฐํฌ๋ฅด, ํ์ฝฉ ์ฐํธ์ |
๊ท์ ๊ฐ ๊ฐํ๋๋ฉด์ ๋ถ๋ถ ๋ด๋ณดํ ํ์ด๋ธ๋ฆฌ๋ ๋ชจ๋ธ์ด ์ฃผ๋ฅ๊ฐ ๋ ๊ฐ๋ฅ์ฑ์ด ๋์์. ์์ ํ ์๊ณ ๋ฆฌ์ฆ ๋ฐฉ์์ ์ ์ ์ด๋ ค์์ง ์ ์์ฃ ใ ใ
์ฑ๊ถ ๋ฉ์ปค๋์ฆ์ ํ์ฉํ ์๋ก์ด ์ ๊ทผ:
// ์ฑ๊ถ ์์คํ
๊ฐ๋
contract ElasticBond {
struct Bond {
uint256 principal; // ์๊ธ
uint256 maturity; // ๋ง๊ธฐ
uint256 targetPrice; // ๋ชฉํ ๊ฐ๊ฒฉ
}
// ๊ฐ๊ฒฉ์ด ๋ฎ์ ๋ ์ฑ๊ถ ๋ฐํ
function issueBond(uint256 amount) external {
require(getPrice() < TARGET_PRICE);
// ์คํ
์ด๋ธ์ฝ์ธ์ ๋ฐ๊ณ ์ฑ๊ถ ๋ฐํ
stable.transferFrom(msg.sender, address(this), amount);
bonds[msg.sender].push(Bond({
principal: amount,
maturity: block.timestamp + 30 days,
targetPrice: TARGET_PRICE
}));
// ๊ณต๊ธ ๊ฐ์ ํจ๊ณผ
}
// ๋ง๊ธฐ ์ ํ๋ฆฌ๋ฏธ์๊ณผ ํจ๊ป ์ํ
function redeemBond(uint256 bondId) external {
Bond memory bond = bonds[msg.sender][bondId];
require(block.timestamp >= bond.maturity);
uint256 premium = calculatePremium(bond);
stable.mint(msg.sender, bond.principal + premium);
}
}
2. ๋์ ์์๋ฃ ๋ชจ๋ธ์์ฅ ์ํฉ์ ๋ฐ๋ผ ์์๋ฃ๋ฅผ ์๋ ์กฐ์ :
โข ๋ณ๋์ฑ ์ฆ๊ฐ ์: ์์๋ฃ ์์น (์ต๋ 2%)
โข ์์๋ฃ ์์ต์ผ๋ก ๋ด๋ณด ๊ฐํ
โข ์์คํ ์์ ์ฑ ํฅ์
์ปค๋ฎค๋ํฐ์ ์ ๋ขฐ๋๋ฅผ ์ ๋ํ:
โข ํํ ์์คํ ๋์
โข ์ ์์ ํ๋ ํจ๋ํฐ
โข ํ๋ ฅ ์ธ์ผํฐ๋ธ ๊ฐํ
๐ ํ์ต ๋ฆฌ์์ค์ ์ปค๋ฎค๋ํฐ
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ๋ ๊น์ด ๊ณต๋ถํ๊ณ ์ถ๋ค๋ฉด? ์ด๋ฐ ๋ฆฌ์์ค๋ค์ ํ์ฉํด๋ณด์ธ์! ๐
โข DeFi Specialization
โข Blockchain Basics
โข Smart Contracts
โข Ethereum Development
โข DeFi Programming
โข Solidity Mastery
โข Finematics
โข Whiteboard Crypto
โข Smart Contract Programmer
| ์ ๋ชฉ | ์ ์ | ํต์ฌ ๋ด์ฉ |
|---|---|---|
| Basis: A Price-Stable Cryptocurrency | Nader Al-Naji | ์ธ๋จ๋ฆฌ์ง ์์ด ๋ชจ๋ธ ์ ์ |
| Ampleforth: A New Synthetic Commodity | Evan Kuo | ๋ฆฌ๋ฒ ์ด์ค ๋ฉ์ปค๋์ฆ ์ค๋ช |
| Frax: A Fractional-Algorithmic Stablecoin | Sam Kazemian | ๋ถ๋ถ ๋ด๋ณด ๋ฐฉ์ ์๊ฐ |
| RAI: A Non-Pegged Stable Asset | Stefan Ionescu | ๋ฐ์ฌ์ ์ง์ ๊ฐ๋ |
โข Foundry: ๋น ๋ฅธ ํ ์คํ ํ๋ ์์ํฌ
โข OpenZeppelin: ๊ฒ์ฆ๋ ์ค๋งํธ ์ปจํธ๋ํธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ
โข Tenderly: ๋๋ฒ๊น ๋ฐ ๋ชจ๋ํฐ๋ง
โข Etherscan: ๋ธ๋ก์ฒด์ธ ํ์๊ธฐ
ํผ์ ๊ณต๋ถํ๋ ๊ฒ๋ณด๋ค ์ปค๋ฎค๋ํฐ์์ ํจ๊ป ๋ฐฐ์ฐ๋ ๊ฒ ํจ์ฌ ํจ๊ณผ์ ์ด์์! ใ ใ
์ฃผ์ ์ปค๋ฎค๋ํฐ:โข Frax Finance
โข Olympus DAO
โข MakerDAO
โข DeFi Pulse
โข @samkazemian
โข @RuneKek
โข @haydenzadams
โข @VitalikButerin
โข r/defi
โข r/ethdev
โข r/CryptoCurrency
โข r/ethereum
๊ทธ๋ฆฌ๊ณ ์ฌ๋ฅ๋ท์์๋ ๋ธ๋ก์ฒด์ธ ๊ฐ๋ฐ์๋ค๊ณผ ๊ต๋ฅํ ์ ์์ด์! ๋ฉํ ๋ง์ ๋ฐ๊ฑฐ๋, ์คํฐ๋ ๊ทธ๋ฃน์ ๋ง๋ค๊ฑฐ๋, ํ๋ก์ ํธ๋ฅผ ํจ๊ป ์งํํ ์๋ ์์ฃ . ์ค์ ๊ฒฝํ์ ์๊ธฐ์ ์ ๋ง ์ข์ ํ๋ซํผ์ด์์ ๐ช
๐ฏ ๋ง๋ฌด๋ฆฌํ๋ฉฐ
์... ์ฌ๊ธฐ๊น์ง ์ฝ์ผ์ จ๋ค๋ฉด ์ ๋ง ๋๋จํ์ธ์! ๐ ์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ๊ตฌ์กฐ์ ์๋ฆฌ๋ฅผ ์์ ํ ํํค์ณ๋ดค๋๋ฐ, ์ด๋ ์ จ๋์?
ํต์ฌ ์์ฝ:
1๏ธโฃ ์๊ณ ๋ฆฌ์ฆ ์คํ
์ด๋ธ์ฝ์ธ์ ๋ด๋ณด ์์ด ์์ํ๊ฒ ์๊ณ ๋ฆฌ์ฆ์ผ๋ก ๊ฐ๊ฒฉ์ ์ ์งํ๋ ค๋ ์๋์์
2๏ธโฃ ๋ฆฌ๋ฒ ์ด์ค ๋ชจ๋ธ, ๋์ผ ํ ํฐ ๋ชจ๋ธ, ๋ถ๋ถ ๋ด๋ณด ๋ชจ๋ธ ๋ฑ ๋ค์ํ ๋ฉ์ปค๋์ฆ์ด ์์ด์
3๏ธโฃ ํ
๋ผ-๋ฃจ๋ ์ฌํ์์ ๋ณด๋ฏ์ด ์ฃฝ์์ ๋์ ๋ฆฌ์คํฌ๊ฐ ์กด์ฌํด์
4๏ธโฃ FRAX ๊ฐ์ ํ์ด๋ธ๋ฆฌ๋ ๋ชจ๋ธ์ด ํ์ฌ ๊ฐ์ฅ ์์ ์ ์ธ ๊ฒ์ผ๋ก ํ๊ฐ๋ฐ๊ณ ์์ด์
5๏ธโฃ ์ค๋ผํด, ๋ด๋ณด ๊ด๋ฆฌ, ์ ๋์ฑ, ๊ฒ์ ์ด๋ก ๋ฑ ์ฌ๋ฌ ์์๊ฐ ๋ณตํฉ์ ์ผ๋ก ์์ฉํด์
6๏ธโฃ ๋ณด์๊ณผ ๋ฆฌ์คํฌ ๊ด๋ฆฌ๊ฐ ์ ๋ง์ ๋ง ์ค์ํด์! ๐
7๏ธโฃ AI, ํฌ๋ก์ค์ฒด์ธ, RWA ์ฐ๊ณ ๋ฑ ๊ณ์ ์งํํ๊ณ ์์ด์ ๐
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ํ์ ์ ์ด์ง๋ง ์ฌ์ ํ ์คํ์ ์ธ ๊ธฐ์ ์ด์์. ํฌ์ํ๊ธฐ ์ ์:
โข ํ๋ก์ ํธ์ ๋ฉ์ปค๋์ฆ์ ์์ ํ ์ดํดํ์ธ์
โข ๊ฐ์ฌ ๋ณด๊ณ ์๋ฅผ ๊ผญ ํ์ธํ์ธ์
โข ๋ถ์ฐ ํฌ์ํ์ธ์ (ํ ๋ฐ๊ตฌ๋์ ๋ชจ๋ ๊ณ๋์ ๋ด์ง ๋ง์ธ์)
โข ์์ด๋ ๊ด์ฐฎ์ ๊ธ์ก๋ง ํฌ์ํ์ธ์
โข DYOR (Do Your Own Research)!
์๊ณ ๋ฆฌ์ฆ ์คํ ์ด๋ธ์ฝ์ธ์ ์์ง ์๋ฒฝํ์ง ์์ง๋ง, ๊ณ์ ๋ฐ์ ํ๊ณ ์์ด์. ํนํ:
โข ๋ถ๋ถ ๋ด๋ณด ๋ฐฉ์์ด ์ฃผ๋ฅ๊ฐ ๋ ๊ฒ ๊ฐ์์
โข AI์ ๋จธ์ ๋ฌ๋์ด ํตํฉ๋ ๊ฑฐ์์
โข ๊ท์ ์ค์๊ฐ ํ์๊ฐ ๋ ๊ฑฐ์์
โข ํฌ๋ก์ค์ฒด์ธ ์ํธ์ด์ฉ์ฑ์ด ๊ฐํ๋ ๊ฑฐ์์
โข ์ค๋ฌผ ์์ฐ๊ณผ์ ์ฐ๊ณ๊ฐ ๋์ด๋ ๊ฑฐ์์
๋ธ๋ก์ฒด์ธ ๊ธฐ์ ์ ๊ณ์ ์งํํ๊ณ ์์ด์! ๐
์๊ณ ๋ฆฌ์ฆ ์คํ
์ด๋ธ์ฝ์ธ๋ ๋ง์ฐฌ๊ฐ์ง์์. ์คํจ์์ ๋ฐฐ์ฐ๊ณ , ๊ฐ์ ํ๊ณ , ๋ ๋์ ์์คํ
์ ๋ง๋ค์ด๊ฐ๊ณ ์์ฃ .
์ฌ๋ฌ๋ถ๋ ์ด ํ์ ์ ์ฌ์ ์ ๋์ฐธํด๋ณด๋ ๊ฑด ์ด๋จ๊น์? ใ
ใ
๊ถ๊ธํ ์ ์ด ์๊ฑฐ๋ ๋ ๊น์ด ๊ณต๋ถํ๊ณ ์ถ๋ค๋ฉด,
์ฌ๋ฅ๋ท์์ ๋ธ๋ก์ฒด์ธ ์ ๋ฌธ๊ฐ๋ค๊ณผ ์ํตํด๋ณด์ธ์! ๐ฌ
์ฌ๊ธฐ๊น์ง ์ฝ์ด์ฃผ์ ์ ์ ๋ง ๊ฐ์ฌํฉ๋๋ค! ๐
์ด ๊ธ์ด ๋์์ด ๋์
จ๋ค๋ฉด, ์ฃผ๋ณ ๋ถ๋ค๊ณผ๋ ๊ณต์ ํด์ฃผ์ธ์!
ํจ๊ป ๋ฐฐ์ฐ๊ณ ์ฑ์ฅํ๋ ๋ธ๋ก์ฒด์ธ ์ปค๋ฎค๋ํฐ๋ฅผ ๋ง๋ค์ด๊ฐ์ ๐ช
๊ด๋ จ ํค์๋
๋๊ธ ์์ฑ
์ด ๊ธ์ ๋ํ ์ฌ๋ฌ๋ถ์ ์๊ฐ์ ๋ค๋ ค์ฃผ์ธ์
๋ก๊ทธ์ธ์ด ํ์ํฉ๋๋ค
๋๊ธ์ ์์ฑํ๋ ค๋ฉด ๋จผ์ ๋ก๊ทธ์ธํด์ฃผ์ธ์.
๋๊ธ 0
์ง์์ธ์ ์ฒ - ์ง์ ์ฌ์ฐ๊ถ ๋ณดํธ ๊ณ ์ง
์ง์ ์ฌ์ฐ๊ถ ๋ณดํธ ๊ณ ์ง
- ์ ์๊ถ ๋ฐ ์์ ๊ถ: ๋ณธ ์ปจํ ์ธ ๋ ์ฌ๋ฅ๋ท์ ๋ ์ AI ๊ธฐ์ ๋ก ์์ฑ๋์์ผ๋ฉฐ, ๋ํ๋ฏผ๊ตญ ์ ์๊ถ๋ฒ ๋ฐ ๊ตญ์ ์ ์๊ถ ํ์ฝ์ ์ํด ๋ณดํธ๋ฉ๋๋ค.
- AI ์์ฑ ์ปจํ ์ธ ์ ๋ฒ์ ์ง์: ๋ณธ AI ์์ฑ ์ปจํ ์ธ ๋ ์ฌ๋ฅ๋ท์ ์ง์ ์ฐฝ์๋ฌผ๋ก ์ธ์ ๋๋ฉฐ, ๊ด๋ จ ๋ฒ๊ท์ ๋ฐ๋ผ ์ ์๊ถ ๋ณดํธ๋ฅผ ๋ฐ์ต๋๋ค.
- ์ฌ์ฉ ์ ํ: ์ฌ๋ฅ๋ท์ ๋ช ์์ ์๋ฉด ๋์ ์์ด ๋ณธ ์ปจํ ์ธ ๋ฅผ ๋ณต์ , ์์ , ๋ฐฐํฌ, ๋๋ ์์ ์ ์ผ๋ก ํ์ฉํ๋ ํ์๋ ์๊ฒฉํ ๊ธ์ง๋ฉ๋๋ค.
- ๋ฐ์ดํฐ ์์ง ๊ธ์ง: ๋ณธ ์ปจํ ์ธ ์ ๋ํ ๋ฌด๋จ ์คํฌ๋ํ, ํฌ๋กค๋ง, ๋ฐ ์๋ํ๋ ๋ฐ์ดํฐ ์์ง์ ๋ฒ์ ์ ์ฌ์ ๋์์ด ๋ฉ๋๋ค.
- AI ํ์ต ์ ํ: ์ฌ๋ฅ๋ท์ AI ์์ฑ ์ปจํ ์ธ ๋ฅผ ํ AI ๋ชจ๋ธ ํ์ต์ ๋ฌด๋จ ์ฌ์ฉํ๋ ํ์๋ ๊ธ์ง๋๋ฉฐ, ์ด๋ ์ง์ ์ฌ์ฐ๊ถ ์นจํด๋ก ๊ฐ์ฃผ๋ฉ๋๋ค.
์์ง ๋๊ธ์ด ์์ต๋๋ค.