Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
65969cf
feat: add dev multisig deployment
nvtaveras Feb 12, 2026
d38a847
feat: MGP14
nvtaveras Feb 13, 2026
a5ad7d4
chore: tentatively add oracle contracts
nvtaveras Feb 13, 2026
e4f987b
refactor: move mgp14 out of celo folder
nvtaveras Feb 13, 2026
ed3b8cc
fix: various fixes, more checks
nvtaveras Feb 13, 2026
9be42b2
chore: fmt
nvtaveras Feb 13, 2026
7cca9ba
chore: delete safe register output
nvtaveras Feb 13, 2026
a0a0f56
chore: update mgp md and title
nvtaveras Feb 13, 2026
1988505
feat: add tx details to MGP14
nvtaveras Feb 13, 2026
f05bab2
chore: grammar
nvtaveras Feb 13, 2026
8ccc1d2
fix: pr comments
nvtaveras Feb 13, 2026
a989205
chore: pr comments
nvtaveras Feb 14, 2026
5936562
fix: md fixes
nvtaveras Feb 14, 2026
e3a83f0
chore: save current stage
philbow61 Feb 20, 2026
28176d6
Merge branch 'feat/deploy-Liquity' into feat/deploy-v3-prestage
philbow61 Feb 20, 2026
f4229d5
feat: add LiquityDeployment script
philbow61 Feb 21, 2026
a701d25
chore: point bold repo to main branch
philbow61 Feb 21, 2026
ec29be5
Merge branch 'feat/deploy-v3-prestage' into feat/deploy-liquity-scripts
nvtaveras Feb 23, 2026
2f98638
feat: add NFT integration to the liquity deployment scripts
philbow61 Feb 24, 2026
60e09f3
feat: log NFT data
philbow61 Feb 24, 2026
788c070
Merge branch 'feat/deploy-v3-prestage' into feat/deploy-liquity-scripts
philbow61 Feb 25, 2026
a10a62a
feat: add AddressBook lookup and premature celo config
philbow61 Feb 25, 2026
661b68e
fix: address review comments
philbow61 Feb 26, 2026
e3a081d
remove: yarn.lock
philbow61 Feb 26, 2026
246e135
chore: update bold repo
solofberlin Feb 27, 2026
87b4c50
feat: parameterize LiquityConfig resolution by token
solofberlin Feb 27, 2026
62afa40
Merge branch 'main' into feat/deploy-liquity-scripts
solofberlin Feb 27, 2026
a8eb0e8
feat: split instanceSalt into proxyLabel/singletonLabel and write NFT…
solofberlin Feb 27, 2026
58be8d6
chore: remove broadcast files and update treb registry
solofberlin Feb 27, 2026
fdf6498
Revert "chore: remove broadcast files and update treb registry"
solofberlin Feb 27, 2026
4c03f5d
chore: update treb registry and remove duplicate config assets
solofberlin Feb 27, 2026
d289559
chore: reset .treb to main, remove dependencies test, move DeployLiqu…
solofberlin Feb 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ docs/
.claude/
.treb/config.local.json
node_modules
.treb/priv/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "lib/mento-router"]
path = lib/mento-router
url = https://github.com/mento-protocol/mento-router
[submodule "lib/bold"]
path = lib/bold
url = https://github.com/mento-protocol/bold
3 changes: 3 additions & 0 deletions foundry.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"lib/bold": {
"rev": "073a25f049f423b3336e3785d5f1e13235ced07b"
},
"lib/forge-std": {
"rev": "8bbcf6e3f8f62f419e5429a0bd89331c85c37824"
},
Expand Down
12 changes: 10 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@ src = "src"
out = "out"
libs = ["lib"]
optimizer = true
ffi = true
additional_compiler_profiles = [
{ name = "no-opt", optimizer_runs = 0 },
]
compilation_restrictions = [
{ paths = "lib/bold/contracts/src/TroveManager.sol", optimizer_runs = 0 },
]
fs_permissions = [
{ access = "read-write", path = "cache"},
{ access = "read-write", path = "out/"},
{ access = "read", path = ".treb/registry.json"},
{ access = "read", path = ".treb/addressbook.json"},
{ access = "read", path = "script/networks" },
{ access = "read", path = "./mgps/"}
{ access = "read", path = "script/config/"},
{ access = "read", path = "mgps/"}
]

[lint]
Expand Down
1 change: 1 addition & 0 deletions lib/bold
Submodule bold added at 858ef0
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
src/=src/
lib/mento-core/lib/bold/:openzeppelin-contracts/=lib/mento-core/lib/bold/contracts/lib/openzeppelin-contracts/
lib/bold/:openzeppelin-contracts/=lib/bold/contracts/lib/openzeppelin-contracts/
openzeppelin-contracts/=lib/mento-core/lib/openzeppelin-contracts-next/
safe-smart-account/=lib/treb-sol/lib/safe-utils/lib/safe-smart-account/contracts/
mento-core/=lib/mento-core/contracts/
64 changes: 64 additions & 0 deletions script/config/ILiquityConfig.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ILiquityConfig {
struct LiquityInstanceConfig {
// ── Instance identity ────────────────────────────────────────────
/// @dev Label used for proxy deployments, e.g. "GBPm"
string proxyLabel;
/// @dev Label used for singleton CREATE3 deployments, e.g. "v3.0.0-GBPm"
string singletonLabel;
// ── Registry lookup keys ─────────────────────────────────────────
string debtTokenLabel; // e.g. "StableTokenV3:GBPm"
string collateralTokenLabel; // e.g. "StableTokenV3:USDm"
string liquidityStrategyLabel; // e.g. "CDPLiquidityStrategy"
string gasTokenLabel; // e.g. "StableTokenV3:USDm"
string oracleAdapterLabel; // e.g. "OracleAdapter"
// ── Addresses ────────────────────────────────────────────────────
address rateFeedID;
address watchdog;
address owner;
address yieldSplitAddress;
// ── FXPriceFeed ──────────────────────────────────────────────────
bool invertRateFeed;
uint256 l2SequencerGracePeriod;
// ── Collateral / TroveManager params ─────────────────────────────
uint256 CCR;
uint256 MCR;
uint256 BCR;
uint256 SCR;
uint256 liquidationPenaltySP;
uint256 liquidationPenaltyRedistribution;
// ── SystemParams: debt ───────────────────────────────────────────
uint256 minDebt;
// ── SystemParams: gas compensation ───────────────────────────────
uint256 collGasCompensationDivisor;
uint256 collGasCompensationCap;
uint256 ethGasCompensation;
// ── SystemParams: interest ───────────────────────────────────────
uint256 minAnnualInterestRate;
// ── SystemParams: redemption ─────────────────────────────────────
uint256 redemptionFeeFloor;
uint256 initialBaseRate;
uint256 redemptionMinuteDecayFactor;
uint256 redemptionBeta;
// ── SystemParams: stability pool ─────────────────────────────────
uint256 spYieldSplit;
uint256 minBoldInSP;
uint256 minBoldAfterRebalance;
// ── NFT Metadata assets ─────────────────────────────────────────
/// @dev Base directory for asset files, relative to project root
/// e.g. "lib/bold/contracts/utils/assets/"
string metadataAssetsBasePath;
/// @dev Filename for the debt token logo (stored under "BOLD" key)
string debtTokenLogoFile;
/// @dev Filename for the collateral token logo
string collateralTokenLogoFile;
/// @dev Must match IERC20Metadata(collateralToken).symbol()
string collateralTokenSymbol;
/// @dev Filename for the font file (stored under "geist" key)
string fontFile;
}

function get() external view returns (LiquityInstanceConfig memory);
}
44 changes: 44 additions & 0 deletions script/config/LiquityConfig.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Vm} from "forge-std/Vm.sol";
import {ILiquityConfig} from "./ILiquityConfig.sol";

// ── Concrete configs ─────────────────────────────────────────────────────────
// Imported here so Foundry compiles their artifacts, enabling vm.deployCode()
// to find them by contract name at script run time.
import "./liquity/LiquityConfig_celo_sepolia_GBPm.sol";
import "./liquity/LiquityConfig_celo_GBPm.sol";
import "./liquity/LiquityConfig_anvil_GBPm.sol";

/**
* @notice Loader library used by deployment scripts.
* @dev Resolves the concrete config contract from the NETWORK env var and the
* token parameter, e.g. LiquityConfigLib.get("GBPm") on network "anvil"
* will deploy LiquityConfig_anvil_GBPm.
* vm.deployCode() instantiates the config locally in Foundry's simulation
* VM without broadcasting it as an on-chain transaction.
*/
library LiquityConfigLib {
address private constant VM_ADDRESS =
address(uint160(uint256(keccak256("hevm cheat code"))));
Vm private constant vm = Vm(VM_ADDRESS);

function get(
string memory token
) internal returns (ILiquityConfig.LiquityInstanceConfig memory) {
string memory network = vm.envString("NETWORK");
string memory name = string.concat(
"LiquityConfig_",
network,
"_",
token
);
address config = vm.deployCode(name);
require(
config != address(0),
string.concat("LiquityConfig: failed to deploy ", name)
);
return ILiquityConfig(config).get();
}
}
67 changes: 67 additions & 0 deletions script/config/liquity/LiquityConfig_anvil_GBPm.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {ILiquityConfig} from "../ILiquityConfig.sol";

/**
* @notice Liquity GBPm/USDm instance config for Anvil (local Monad mainnet fork).
* @dev gasTokenLabel == collateralTokenLabel: USDm serves as both collateral and gas token.
*/
contract LiquityConfig_anvil_GBPm is ILiquityConfig {
Comment thread
philbow61 marked this conversation as resolved.
function get()
external
pure
override
returns (ILiquityConfig.LiquityInstanceConfig memory)
{
return
ILiquityConfig.LiquityInstanceConfig({
proxyLabel: "GBPm",
singletonLabel: "v3.0.0-GBPm",
// ── Registry lookup keys ────────────────────────────────
debtTokenLabel: "StableTokenV3:GBPm",
collateralTokenLabel: "StableTokenV3:USDm",
liquidityStrategyLabel: "CDPLiquidityStrategy",
gasTokenLabel: "StableTokenV3:USDm",
oracleAdapterLabel: "OracleAdapter",
// ── Addresses ──────────────────────────────────────────
rateFeedID: 0x00000000000000000000000000000000075BCd15,
watchdog: 0x00000000000000000000000000000002DfDC1c3E,
owner: 0x000000000000000000000000000000000001E240,
yieldSplitAddress: 0x000000000000000000000000000000000001e241,
// ── FXPriceFeed ────────────────────────────────────────
invertRateFeed: false,
l2SequencerGracePeriod: 1200,
// ── Collateral params ──────────────────────────────────
CCR: 1500000000000000000,
MCR: 1100000000000000000,
BCR: 100000000000000000,
SCR: 1100000000000000000,
liquidationPenaltySP: 50000000000000000,
liquidationPenaltyRedistribution: 100000000000000000,
// ── SystemParams: debt ─────────────────────────────────
minDebt: 100000000000000000000,
// ── SystemParams: gas compensation ─────────────────────
collGasCompensationDivisor: 200,
collGasCompensationCap: 2000000000000000000,
ethGasCompensation: 37500000000000000,
// ── SystemParams: interest ─────────────────────────────
minAnnualInterestRate: 5000000000000000,
// ── SystemParams: redemption ───────────────────────────
redemptionFeeFloor: 2500000000000000,
initialBaseRate: 1000000000000000000,
redemptionMinuteDecayFactor: 998076443575628800,
redemptionBeta: 1,
// ── SystemParams: stability pool ───────────────────────
spYieldSplit: 750000000000000000,
minBoldInSP: 1000000000000000000,
minBoldAfterRebalance: 1000000000000000000000,
// ── NFT Metadata assets ───────────────────────────────
metadataAssetsBasePath: "script/config/liquity/assets/",
debtTokenLogoFile: "GBPm.svg",
collateralTokenLogoFile: "USDm.svg",
collateralTokenSymbol: "USDm",
fontFile: "geist.txt"
});
}
}
67 changes: 67 additions & 0 deletions script/config/liquity/LiquityConfig_celo_GBPm.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {ILiquityConfig} from "../ILiquityConfig.sol";

/**
* @notice Liquity GBPm/USDm instance config for Celo.
*/
contract LiquityConfig_celo_GBPm is ILiquityConfig {
function get()
external
pure
override
returns (ILiquityConfig.LiquityInstanceConfig memory)
{
return
ILiquityConfig.LiquityInstanceConfig({
proxyLabel: "GBPm",
singletonLabel: "v3.0.0-GBPm",
// ── Registry lookup keys ────────────────────────────────
// TODO: change to labels used in prestage Celo script
debtTokenLabel: "StableTokenV3:GBPm",
collateralTokenLabel: "StableTokenV3:USDm",
liquidityStrategyLabel: "CDPLiquidityStrategy",
gasTokenLabel: "StableTokenV3:USDm",
oracleAdapterLabel: "OracleAdapter",
// ── Addresses ──────────────────────────────────────────
rateFeedID: 0xf590b62f9cfcc6409075b1ecAc8176fe25744B88, // GBP/USD
watchdog: 0x287810F677516f10993ff63a520aAD5509F35796, // TODO: change to FXPriceFeed Watchdog Celo
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we resolve this now? can I help?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah there are some addresses, and i wasn't sure which ones we will use on Celo

owner: 0x287810F677516f10993ff63a520aAD5509F35796, // TODO: change to Owner Celo
Comment thread
philbow61 marked this conversation as resolved.
yieldSplitAddress: 0x287810F677516f10993ff63a520aAD5509F35796, // TODO: change to Yield Split Address Celo
Comment thread
philbow61 marked this conversation as resolved.
// ── FXPriceFeed ────────────────────────────────────────
invertRateFeed: true, // SortedOracles: GBP/USD is inverted as (USD/GBP)
l2SequencerGracePeriod: 1200, // 20 minutes
// ── Collateral params ──────────────────────────────────
CCR: 1e18 * 1.35, // 135%
MCR: 1e18 * 1.1, // 110%
BCR: 1e18 * 0.1, // 10%
SCR: 1e18 * 1.1, // 110%
liquidationPenaltySP: 1e18 * 0.05, // 5%
liquidationPenaltyRedistribution: 1e18 * 0.1, // 10%
// ── SystemParams: debt ─────────────────────────────────
minDebt: 1_000e18, // 1,000 GBPm
// ── SystemParams: gas compensation ─────────────────────
collGasCompensationDivisor: 200,
collGasCompensationCap: 10e18, // 10 USDm
ethGasCompensation: 1e18, // 1 CELO
// ── SystemParams: interest ─────────────────────────────
minAnnualInterestRate: 1e18 * 0.002, // 0.2%
// ── SystemParams: redemption ───────────────────────────
redemptionFeeFloor: 1e18 * 0.005, // 0.5%
initialBaseRate: 1e18, // 100%
redemptionMinuteDecayFactor: 1e18 * 0.9885140204, // 60 minutes half-life time
redemptionBeta: 1,
// ── SystemParams: stability pool ───────────────────────
spYieldSplit: 1e18 * 0.75, // 75%
minBoldInSP: 1e18, // 1 GBPm
minBoldAfterRebalance: 5_000e18, // 5_000 GBPm
// ── NFT Metadata assets ───────────────────────────────
metadataAssetsBasePath: "script/config/liquity/assets/",
debtTokenLogoFile: "GBPm.svg",
collateralTokenLogoFile: "USDm.svg",
collateralTokenSymbol: "USDm",
fontFile: "geist.txt"
});
}
}
67 changes: 67 additions & 0 deletions script/config/liquity/LiquityConfig_celo_sepolia_GBPm.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {ILiquityConfig} from "../ILiquityConfig.sol";

/**
* @notice Liquity GBPm/USDm instance config for Celo.
*/
contract LiquityConfig_celo_sepolia_GBPm is ILiquityConfig {
function get()
external
pure
override
returns (ILiquityConfig.LiquityInstanceConfig memory)
{
return
ILiquityConfig.LiquityInstanceConfig({
proxyLabel: "GBPm",
singletonLabel: "v3.0.0-GBPm",
// ── Registry lookup keys ────────────────────────────────
// TODO: change to labels used in prestage Celo script
debtTokenLabel: "cGBP",
collateralTokenLabel: "cUSD",
liquidityStrategyLabel: "CDPLiquidityStrategy",
gasTokenLabel: "cUSD",
oracleAdapterLabel: "OracleAdapter",
// ── Addresses ──────────────────────────────────────────
rateFeedID: 0xf590b62f9cfcc6409075b1ecAc8176fe25744B88, // GBP/USD
watchdog: 0x287810F677516f10993ff63a520aAD5509F35796, // TODO: change to FXPriceFeed Watchdog Celo
owner: 0x287810F677516f10993ff63a520aAD5509F35796, // TODO: change to Owner Celo
yieldSplitAddress: 0x287810F677516f10993ff63a520aAD5509F35796, // TODO: change to Yield Split Address Celo
// ── FXPriceFeed ────────────────────────────────────────
invertRateFeed: true, // SortedOracles: GBP/USD is inverted as (USD/GBP)
l2SequencerGracePeriod: 1200, // 20 minutes
// ── Collateral params ──────────────────────────────────
CCR: 1e18 * 1.35, // 135%
MCR: 1e18 * 1.1, // 110%
BCR: 1e18 * 0.1, // 10%
SCR: 1e18 * 1.1, // 110%
liquidationPenaltySP: 1e18 * 0.05, // 5%
liquidationPenaltyRedistribution: 1e18 * 0.1, // 10%
// ── SystemParams: debt ─────────────────────────────────
minDebt: 1_000e18, // 1,000 GBPm
// ── SystemParams: gas compensation ─────────────────────
collGasCompensationDivisor: 200,
collGasCompensationCap: 10e18, // 10 USDm
ethGasCompensation: 1e18, // 1 CELO
// ── SystemParams: interest ─────────────────────────────
minAnnualInterestRate: 1e18 * 0.002, // 0.2%
// ── SystemParams: redemption ───────────────────────────
redemptionFeeFloor: 1e18 * 0.005, // 0.5%
initialBaseRate: 1e18, // 100%
redemptionMinuteDecayFactor: 1e18 * 0.9885140204, // 60 minutes half-life time
redemptionBeta: 1,
// ── SystemParams: stability pool ───────────────────────
spYieldSplit: 1e18 * 0.75, // 75%
minBoldInSP: 1e18, // 1 GBPm
minBoldAfterRebalance: 5_000e18, // 5_000 GBPm
// ── NFT Metadata assets ───────────────────────────────
metadataAssetsBasePath: "script/config/liquity/assets/",
debtTokenLogoFile: "GBPm.svg",
collateralTokenLogoFile: "USDm.svg",
collateralTokenSymbol: "USDm",
fontFile: "geist.txt"
});
}
}
Loading