Skip to content

Commit

Permalink
Merge pull request #411 from Gravita-Protocol/update-borrowing-fees
Browse files Browse the repository at this point in the history
update borrowing fees
  • Loading branch information
spider-g authored Apr 22, 2024
2 parents ae03719 + b7d6fbb commit c4051c0
Show file tree
Hide file tree
Showing 16 changed files with 1,118 additions and 78 deletions.
2 changes: 1 addition & 1 deletion scripts/admin/generate_batches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import batchTemplate from "./batch_template_body.json"
import transactionTemplate from "./batch_template_transaction.json"
import { ethers } from "ethers"

const etaWindow = 24 // hours for multisig
const etaWindow = 36 // hours for multisig

async function main() {
const eta = _calcETA()
Expand Down
90 changes: 77 additions & 13 deletions scripts/admin/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,30 @@
"timelock": "0x09dfdF392a56E4316e97A13e20b09C415fCD3d7b",
"adminContract": "0x4928c8F8c20A1E3C295DddBe05095A9aBBdB3d14",
"fees": [
{
"symbol": "wETH",
"address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
"percent": 9
},
{
"symbol": "wstETH",
"address": "0x5979D7b546E38E414F7E9822514be443A4800529",
"percent": 4
"percent": 9
},
{
"symbol": "rETH",
"address": "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8",
"percent": 4
"percent": 9
},
{
"symbol": "sfrxETH",
"address": "0x95aB45875cFFdba1E5f451B950bC2E42c0053f39",
"percent": 4
"percent": 9
},
{
"symbol": "weETH",
"address": "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe",
"percent": 10
}
]
},
Expand All @@ -30,10 +40,15 @@
"timelock": "0x1A9942B9Eca8EC175261fD0F60a71aE4745520A4",
"adminContract": "0xC8a25eA0Cbd92A6F787AeED8387E04559053a9f8",
"fees": [
{
"symbol": "wETH",
"address": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"percent": 9
},
{
"symbol": "wstETH",
"address": "0xB5beDd42000b71FddE22D3eE8a79Bd49A568fC8F",
"percent": 4
"percent": 9
}
]
},
Expand All @@ -44,30 +59,64 @@
"timelock": "0x57a1953bF194A1EF73396e442Ac7Dc761dCd23cc",
"adminContract": "0xf7Cc67326F9A1D057c1e4b110eF6c680B13a1f53",
"fees": [
{
"symbol": "wETH",
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"percent": 9
},
{
"symbol": "bLUSD",
"address": "0xB9D7DdDca9a4AC480991865EfEf82E01273F79C3",
"percent": 9
},
{
"symbol": "rETH",
"address": "0xae78736Cd615f374D3085123A210448E74Fc6393",
"percent": 4
"percent": 9
},
{
"symbol": "wstETH",
"address": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
"percent": 4
"percent": 9
},
{
"symbol": "swETH",
"address": "0xf951E335afb289353dc249e82926178EaC7DEd78",
"percent": 4
"percent": 9
},
{
"symbol": "sfrxETH",
"address": "0xac3E018457B222d93114458476f3E3416Abbe38F",
"percent": 4
"percent": 9
},
{
"symbol": "osETH",
"address": "0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38",
"percent": 4
"percent": 9
},
{
"symbol": "weETH",
"address": "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",
"percent": 10
}
]
},
{
"id": 5000,
"network": "mantle",
"multisig": "0x601FD66A2a32D980835517b135178124E973Dd7f",
"timelock": "0xB7D276B74B4c8042aD22d78fFAD15fA5bd02A783",
"adminContract": "0x4F39F12064D83F6Dd7A2BDb0D53aF8be560356A6",
"fees": [
{
"symbol": "wETH",
"address": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead1111",
"percent": 9
},
{
"symbol": "mETH",
"address": "0xcDA86A272531e8640cD7F1a92c01839911B90bb0",
"percent": 9
}
]
},
Expand All @@ -78,15 +127,20 @@
"timelock": "0x9D8bB5496332cbeeD59f1211f28dB8b5Eb214B6D",
"adminContract": "0x326398De2dB419Ee39F97600a5eeE97093cf3B27",
"fees": [
{
"symbol": "wETH",
"address": "0x4200000000000000000000000000000000000006",
"percent": 9
},
{
"symbol": "wstETH",
"address": "0x1f32b1c2345538c0c6f582fcb022739c4a194ebb",
"percent": 4
"percent": 9
},
{
"symbol": "rETH",
"address": "0x9bcef72be871e61ed4fbbc7630889bee758eb81d",
"percent": 4
"percent": 9
}
]
},
Expand All @@ -97,10 +151,15 @@
"timelock": "0x42865C7FA0b84cf76C8e8256f3356226EDC3b1be",
"adminContract": "0x6b42581aC12F442503Dfb3dff2bC75ed83850637",
"fees": [
{
"symbol": "wETH",
"address": "0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",
"percent": 9
},
{
"symbol": "rETH",
"address": "0xb23C20EFcE6e24Acca0Cef9B7B7aA196b84EC942",
"percent": 4
"percent": 9
}
]
},
Expand All @@ -111,10 +170,15 @@
"timelock": "0x23D57c3F65eD7cdd36fea54cA0f9E32D91EaeD63",
"adminContract": "0x441F6b484FD60C31b3ca9c61014030b0403F805a",
"fees": [
{
"symbol": "wETH",
"address": "0x5aea5775959fbc2557cc8789bc1bf90a239d9a91",
"percent": 9
},
{
"symbol": "wstETH",
"address": "0x703b52F2b28fEbcB60E1372858AF5b18849FE867",
"percent": 4
"percent": 9
}
]
}
Expand Down
100 changes: 93 additions & 7 deletions scripts/admin/output/arbitrum-execute.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "1.0",
"chainId": "42161",
"createdAt": "1708517440639",
"createdAt": "1713821252411",
"meta": {
"name": "Transactions Batch",
"description": "",
Expand Down Expand Up @@ -50,8 +50,8 @@
"target": "0x4928c8F8c20A1E3C295DddBe05095A9aBBdB3d14",
"value": "0",
"signature": "setBorrowingFee(address,uint256)",
"eta": "1708776640",
"data": "0x0000000000000000000000005979d7b546e38e414f7e9822514be443a4800529000000000000000000000000000000000000000000000000008e1bc9bf040000"
"eta": "1714123652",
"data": "0x00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000000000000000000000000000013fbe85edc90000"
}
},
{
Expand Down Expand Up @@ -93,8 +93,8 @@
"target": "0x4928c8F8c20A1E3C295DddBe05095A9aBBdB3d14",
"value": "0",
"signature": "setBorrowingFee(address,uint256)",
"eta": "1708776640",
"data": "0x000000000000000000000000ec70dcb4a1efa46b8f2d97c310c9c4790ba5ffa8000000000000000000000000000000000000000000000000008e1bc9bf040000"
"eta": "1714123652",
"data": "0x0000000000000000000000005979d7b546e38e414f7e9822514be443a4800529000000000000000000000000000000000000000000000000013fbe85edc90000"
}
},
{
Expand Down Expand Up @@ -136,8 +136,94 @@
"target": "0x4928c8F8c20A1E3C295DddBe05095A9aBBdB3d14",
"value": "0",
"signature": "setBorrowingFee(address,uint256)",
"eta": "1708776640",
"data": "0x00000000000000000000000095ab45875cffdba1e5f451b950bc2e42c0053f39000000000000000000000000000000000000000000000000008e1bc9bf040000"
"eta": "1714123652",
"data": "0x000000000000000000000000ec70dcb4a1efa46b8f2d97c310c9c4790ba5ffa8000000000000000000000000000000000000000000000000013fbe85edc90000"
}
},
{
"to": "0x09dfdF392a56E4316e97A13e20b09C415fCD3d7b",
"value": "0",
"data": null,
"contractMethod": {
"name": "executeTransaction",
"payable": false,
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "string",
"name": "signature",
"type": "string"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "eta",
"type": "uint256"
}
]
},
"contractInputsValues": {
"target": "0x4928c8F8c20A1E3C295DddBe05095A9aBBdB3d14",
"value": "0",
"signature": "setBorrowingFee(address,uint256)",
"eta": "1714123652",
"data": "0x00000000000000000000000095ab45875cffdba1e5f451b950bc2e42c0053f39000000000000000000000000000000000000000000000000013fbe85edc90000"
}
},
{
"to": "0x09dfdF392a56E4316e97A13e20b09C415fCD3d7b",
"value": "0",
"data": null,
"contractMethod": {
"name": "executeTransaction",
"payable": false,
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "string",
"name": "signature",
"type": "string"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "eta",
"type": "uint256"
}
]
},
"contractInputsValues": {
"target": "0x4928c8F8c20A1E3C295DddBe05095A9aBBdB3d14",
"value": "0",
"signature": "setBorrowingFee(address,uint256)",
"eta": "1714123652",
"data": "0x00000000000000000000000035751007a407ca6feffe80b3cb397736d2cf4dbe000000000000000000000000000000000000000000000000016345785d8a0000"
}
}
]
Expand Down
Loading

0 comments on commit c4051c0

Please sign in to comment.