Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(protocol): lower L2-to-L1 bridge quota #17020

Merged
merged 13 commits into from
May 8, 2024
20 changes: 15 additions & 5 deletions packages/protocol/script/DeployL1QuotaManager.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contract DeployL1QuotaManager is DeployCapability {
}

function run() external broadcast {
// Deploy the QuotaManager contract with a 15 minute quota period
// Deploy the QuotaManager contract on Ethereum
QuotaManager qm = QuotaManager(
deployProxy({
name: "quota_manager",
Expand All @@ -27,10 +27,20 @@ contract DeployL1QuotaManager is DeployCapability {
})
);

// L2-to-L1 Ether per 15 minutes: 500 Ether
qm.updateQuota(address(0), 250 ether);
// Config L2-to-L1 quota
uint104 value = 200_000; // USD
uint104 priceETH = 3100; // USD
uint104 priceTKO = 5; // USD

// L2-to-L1 TKO per 15 minutes: 100_000 (0.01% total supply)
qm.updateQuota(0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800, 100_000 ether);
// ETH
qm.updateQuota(address(0), value * 1 ether / priceETH);
// WETH
qm.updateQuota(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, value * 1 ether / priceETH);
// TKO
qm.updateQuota(0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800, value * 1e18 / priceTKO);
// USDT
qm.updateQuota(0xdAC17F958D2ee523a2206206994597C13D831ec7, value * 1e6);
// USDC
qm.updateQuota(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, value * 1e6);
}
}