Skip to content

Commit

Permalink
fix: default perf fee for v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Nov 24, 2023
1 parent 5289334 commit 428cc21
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 35 deletions.
30 changes: 15 additions & 15 deletions data/meta/strategies/137.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"lastUpdate": "2023-11-22T13:04:48.940779+01:00",
"lastUpdate": "2023-11-24T12:50:44.563902+01:00",
"version": {
"major": 0,
"minor": 1,
"patch": 4
"patch": 8
},
"shouldRefresh": false,
"strategies": {
Expand All @@ -26,7 +26,7 @@
"lastPerformanceFee": "500",
"lastReport": "1700336003",
"lastDebtRatio": "2500",
"lastEstimatedTotalAssets": "656984402917460083437",
"lastEstimatedTotalAssets": "657028220783943094576",
"isRetired": true,
"displayName": "",
"description": "",
Expand All @@ -51,7 +51,7 @@
"lastPerformanceFee": "1000",
"lastReport": "1700581296",
"lastDebtRatio": "5000",
"lastEstimatedTotalAssets": "1313968800830791033895",
"lastEstimatedTotalAssets": "1314156426526262412957",
"isRetired": true,
"displayName": "",
"description": "",
Expand All @@ -76,7 +76,7 @@
"lastPerformanceFee": "1000",
"lastReport": "1700581296",
"lastDebtRatio": "3500",
"lastEstimatedTotalAssets": "588186985022747189",
"lastEstimatedTotalAssets": "588273988224583438",
"isRetired": true,
"displayName": "",
"description": "",
Expand All @@ -101,7 +101,7 @@
"lastPerformanceFee": "1000",
"lastReport": "1700581296",
"lastDebtRatio": "2500",
"lastEstimatedTotalAssets": "707154371940333735144",
"lastEstimatedTotalAssets": "708475445676647760132",
"isRetired": true,
"displayName": "",
"description": "",
Expand All @@ -126,7 +126,7 @@
"lastPerformanceFee": "1000",
"lastReport": "1700581296",
"lastDebtRatio": "4000",
"lastEstimatedTotalAssets": "682228791885217540",
"lastEstimatedTotalAssets": "683984278784720842",
"isRetired": true,
"displayName": "",
"description": "",
Expand All @@ -145,13 +145,13 @@
"keepCRV": null,
"keepCRVPercent": null,
"keepCVX": null,
"lastTotalDebt": "5038000956",
"lastTotalDebt": "5041279649",
"lastTotalLoss": "0",
"lastTotalGain": "0",
"lastPerformanceFee": "1000",
"lastReport": "1700412668",
"lastDebtRatio": "5000",
"lastEstimatedTotalAssets": "5118126698",
"lastReport": "1700758301",
"lastDebtRatio": "5001",
"lastEstimatedTotalAssets": "5121718190",
"isRetired": true,
"displayName": "",
"description": "",
Expand Down Expand Up @@ -195,13 +195,13 @@
"keepCRV": null,
"keepCRVPercent": null,
"keepCVX": null,
"lastTotalDebt": "5037493272",
"lastTotalDebt": "5040054844",
"lastTotalLoss": "0",
"lastTotalGain": "0",
"lastPerformanceFee": "500",
"lastReport": "1700412642",
"lastDebtRatio": "5000",
"lastEstimatedTotalAssets": "5040887114",
"lastReport": "1700758281",
"lastDebtRatio": "4999",
"lastEstimatedTotalAssets": "5044129476",
"isRetired": true,
"displayName": "",
"description": "",
Expand Down
2 changes: 1 addition & 1 deletion data/meta/tokens/137.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lastUpdate": "2023-11-22T13:04:48.784614+01:00",
"lastUpdate": "2023-11-24T12:50:44.432368+01:00",
"version": {
"major": 0,
"minor": 1,
Expand Down
36 changes: 18 additions & 18 deletions data/meta/vaults/137.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"lastUpdate": "2023-11-22T13:04:47.711224+01:00",
"lastUpdate": "2023-11-24T12:50:43.423936+01:00",
"version": {
"major": 0,
"minor": 1,
"patch": 5
"patch": 9
},
"shouldRefresh": false,
"vaults": {
Expand All @@ -20,8 +20,8 @@
"managementFee": 0,
"emergencyShutdown": false,
"lastActiveStrategies": [],
"lastPricePerShare": "1000000006757151678",
"lastTotalAssets": "656984402917460083437",
"lastPricePerShare": "1000033280764243459",
"lastTotalAssets": "657028220783943094576",
"isRetired": false,
"isHidden": false,
"migration": {
Expand Down Expand Up @@ -80,8 +80,8 @@
"managementFee": 0,
"emergencyShutdown": false,
"lastActiveStrategies": [],
"lastPricePerShare": "1000000000000000000",
"lastTotalAssets": "1313968800830791033895",
"lastPricePerShare": "1000019729423519543",
"lastTotalAssets": "1314156426526262412957",
"isRetired": false,
"isHidden": false,
"migration": {
Expand Down Expand Up @@ -140,8 +140,8 @@
"managementFee": 0,
"emergencyShutdown": false,
"lastActiveStrategies": [],
"lastPricePerShare": "1000000000000000000",
"lastTotalAssets": "588186985022747189",
"lastPricePerShare": "1000020325674957065",
"lastTotalAssets": "588273988224583438",
"isRetired": false,
"isHidden": false,
"migration": {
Expand All @@ -168,8 +168,8 @@
"managementFee": 0,
"emergencyShutdown": false,
"lastActiveStrategies": [],
"lastPricePerShare": "1001103196016140334",
"lastTotalAssets": "707154371940333735144",
"lastPricePerShare": "1002750157253569445",
"lastTotalAssets": "708475445676647760132",
"isRetired": false,
"isHidden": false,
"migration": {
Expand All @@ -196,8 +196,8 @@
"managementFee": 0,
"emergencyShutdown": false,
"lastActiveStrategies": [],
"lastPricePerShare": "1000116566308938822",
"lastTotalAssets": "682228791885217540",
"lastPricePerShare": "1002446048716463358",
"lastTotalAssets": "683984278784720842",
"isRetired": false,
"isHidden": false,
"migration": {
Expand Down Expand Up @@ -227,8 +227,8 @@
"0xdb92b89ca415c0dab40dc96e99fc411c08f20780",
"0xb1403908f772e4374bb151f7c67e88761a0eb4f1"
],
"lastPricePerShare": "1002856",
"lastTotalAssets": "10075494228",
"lastPricePerShare": "1003041",
"lastTotalAssets": "10081334493",
"isRetired": false,
"isHidden": false,
"migration": {
Expand All @@ -255,8 +255,8 @@
"managementFee": 0,
"emergencyShutdown": false,
"lastActiveStrategies": [],
"lastPricePerShare": "1004605",
"lastTotalAssets": "5118126698",
"lastPricePerShare": "1005001",
"lastTotalAssets": "5121718190",
"isRetired": false,
"isHidden": false,
"migration": {
Expand Down Expand Up @@ -311,8 +311,8 @@
"managementFee": 0,
"emergencyShutdown": false,
"lastActiveStrategies": [],
"lastPricePerShare": "1004689",
"lastTotalAssets": "5040887114",
"lastPricePerShare": "1004968",
"lastTotalAssets": "5044129476",
"isRetired": false,
"isHidden": false,
"migration": {
Expand Down
7 changes: 6 additions & 1 deletion internal/fetcher/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,12 @@ func handleV3StrategyCalls(strat models.TStrategy, response map[string][]interfa
rawPerformanceFee := response[strat.Address.Hex()+`performanceFee`]

strat.LastEstimatedTotalAssets = helpers.DecodeBigInt(rawEstimatedTotalAssets)
strat.LastPerformanceFee = helpers.DecodeBigInt(rawPerformanceFee)

if (len(rawPerformanceFee) > 0) && (len(rawStrategies) > 0) {
strat.LastPerformanceFee = helpers.DecodeBigInt(rawPerformanceFee)
} else {
strat.LastPerformanceFee = bigNumber.NewInt(1000) // Default to 1000, aka 10%
}
strat.LastTotalDebt = bigNumber.SetInt(rawStrategies[0].(typeOfRawStrategies).CurrentDebt)
strat.TimeActivated = bigNumber.SetInt(rawStrategies[0].(typeOfRawStrategies).Activation)
strat.LastReport = bigNumber.SetInt(rawStrategies[0].(typeOfRawStrategies).LastReport)
Expand Down

0 comments on commit 428cc21

Please sign in to comment.