Skip to content

Commit bb7abef

Browse files
Feat: updated computation of APY (#1364)
* updated computation of APY * added aave hub abi --------- Co-authored-by: Jenelyn Castil Contillo <jenelyncontillo02141995@gmail.com>
1 parent 939a668 commit bb7abef

File tree

2 files changed

+379
-5
lines changed

2 files changed

+379
-5
lines changed
Lines changed: 351 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,351 @@
1+
[
2+
{
3+
"inputs": [
4+
{ "internalType": "address", "name": "_master", "type": "address" },
5+
{ "internalType": "address", "name": "_aaveAddress", "type": "address" },
6+
{ "internalType": "address", "name": "_lendingAddress", "type": "address" }
7+
],
8+
"stateMutability": "nonpayable",
9+
"type": "constructor"
10+
},
11+
{ "inputs": [], "name": "AlreadySet", "type": "error" },
12+
{ "inputs": [], "name": "FailedInnerCall", "type": "error" },
13+
{ "inputs": [], "name": "InvalidAction", "type": "error" },
14+
{ "inputs": [], "name": "InvalidToken", "type": "error" },
15+
{ "inputs": [], "name": "InvalidValue", "type": "error" },
16+
{ "inputs": [], "name": "NoValue", "type": "error" },
17+
{ "inputs": [], "name": "NotMaster", "type": "error" },
18+
{ "inputs": [], "name": "NotProposed", "type": "error" },
19+
{
20+
"anonymous": false,
21+
"inputs": [
22+
{ "indexed": false, "internalType": "uint256", "name": "nftId", "type": "uint256" },
23+
{ "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }
24+
],
25+
"name": "IsBorrowAave",
26+
"type": "event"
27+
},
28+
{
29+
"anonymous": false,
30+
"inputs": [
31+
{ "indexed": false, "internalType": "uint256", "name": "nftId", "type": "uint256" },
32+
{ "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }
33+
],
34+
"name": "IsDepositAave",
35+
"type": "event"
36+
},
37+
{
38+
"anonymous": false,
39+
"inputs": [
40+
{ "indexed": false, "internalType": "uint256", "name": "nftId", "type": "uint256" },
41+
{ "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }
42+
],
43+
"name": "IsPaybackAave",
44+
"type": "event"
45+
},
46+
{
47+
"anonymous": false,
48+
"inputs": [
49+
{ "indexed": false, "internalType": "uint256", "name": "nftId", "type": "uint256" },
50+
{ "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }
51+
],
52+
"name": "IsSolelyDepositAave",
53+
"type": "event"
54+
},
55+
{
56+
"anonymous": false,
57+
"inputs": [
58+
{ "indexed": false, "internalType": "uint256", "name": "nftId", "type": "uint256" },
59+
{ "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }
60+
],
61+
"name": "IsSolelyWithdrawAave",
62+
"type": "event"
63+
},
64+
{
65+
"anonymous": false,
66+
"inputs": [
67+
{ "indexed": false, "internalType": "uint256", "name": "nftId", "type": "uint256" },
68+
{ "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }
69+
],
70+
"name": "IsWithdrawAave",
71+
"type": "event"
72+
},
73+
{
74+
"anonymous": false,
75+
"inputs": [
76+
{
77+
"indexed": false,
78+
"internalType": "address",
79+
"name": "underlyingAsset",
80+
"type": "address"
81+
},
82+
{ "indexed": false, "internalType": "address", "name": "aaveToken", "type": "address" },
83+
{ "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }
84+
],
85+
"name": "SetAaveTokenAddress",
86+
"type": "event"
87+
},
88+
{
89+
"inputs": [],
90+
"name": "AAVE_ADDRESS",
91+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
92+
"stateMutability": "view",
93+
"type": "function"
94+
},
95+
{
96+
"inputs": [],
97+
"name": "POSITION_NFT",
98+
"outputs": [{ "internalType": "contract IPositionNFTs", "name": "", "type": "address" }],
99+
"stateMutability": "view",
100+
"type": "function"
101+
},
102+
{
103+
"inputs": [],
104+
"name": "WETH_ADDRESS",
105+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
106+
"stateMutability": "view",
107+
"type": "function"
108+
},
109+
{
110+
"inputs": [],
111+
"name": "WISE_LENDING",
112+
"outputs": [{ "internalType": "contract IWiseLending", "name": "", "type": "address" }],
113+
"stateMutability": "view",
114+
"type": "function"
115+
},
116+
{
117+
"inputs": [],
118+
"name": "WISE_SECURITY",
119+
"outputs": [{ "internalType": "contract IWiseSecurity", "name": "", "type": "address" }],
120+
"stateMutability": "view",
121+
"type": "function"
122+
},
123+
{
124+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
125+
"name": "aaveTokenAddress",
126+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
127+
"stateMutability": "view",
128+
"type": "function"
129+
},
130+
{
131+
"inputs": [
132+
{ "internalType": "uint256", "name": "_nftId", "type": "uint256" },
133+
{ "internalType": "address", "name": "_underlyingAsset", "type": "address" },
134+
{ "internalType": "uint256", "name": "_borrowAmount", "type": "uint256" }
135+
],
136+
"name": "borrowExactAmount",
137+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
138+
"stateMutability": "nonpayable",
139+
"type": "function"
140+
},
141+
{
142+
"inputs": [
143+
{ "internalType": "uint256", "name": "_nftId", "type": "uint256" },
144+
{ "internalType": "uint256", "name": "_borrowAmount", "type": "uint256" }
145+
],
146+
"name": "borrowExactAmountETH",
147+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
148+
"stateMutability": "nonpayable",
149+
"type": "function"
150+
},
151+
{
152+
"inputs": [],
153+
"name": "claimOwnership",
154+
"outputs": [],
155+
"stateMutability": "nonpayable",
156+
"type": "function"
157+
},
158+
{
159+
"inputs": [
160+
{ "internalType": "uint256", "name": "_nftId", "type": "uint256" },
161+
{ "internalType": "address", "name": "_underlyingAsset", "type": "address" },
162+
{ "internalType": "uint256", "name": "_amount", "type": "uint256" }
163+
],
164+
"name": "depositExactAmount",
165+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
166+
"stateMutability": "nonpayable",
167+
"type": "function"
168+
},
169+
{
170+
"inputs": [{ "internalType": "uint256", "name": "_nftId", "type": "uint256" }],
171+
"name": "depositExactAmountETH",
172+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
173+
"stateMutability": "payable",
174+
"type": "function"
175+
},
176+
{
177+
"inputs": [],
178+
"name": "depositExactAmountETHMint",
179+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
180+
"stateMutability": "payable",
181+
"type": "function"
182+
},
183+
{
184+
"inputs": [
185+
{ "internalType": "address", "name": "_underlyingAsset", "type": "address" },
186+
{ "internalType": "uint256", "name": "_amount", "type": "uint256" }
187+
],
188+
"name": "depositExactAmountMint",
189+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
190+
"stateMutability": "nonpayable",
191+
"type": "function"
192+
},
193+
{
194+
"inputs": [{ "internalType": "address", "name": "_underlyingAsset", "type": "address" }],
195+
"name": "getAavePoolAPY",
196+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
197+
"stateMutability": "view",
198+
"type": "function"
199+
},
200+
{
201+
"inputs": [{ "internalType": "address", "name": "_underlyingAsset", "type": "address" }],
202+
"name": "getLendingRate",
203+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
204+
"stateMutability": "view",
205+
"type": "function"
206+
},
207+
{
208+
"inputs": [],
209+
"name": "master",
210+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
211+
"stateMutability": "view",
212+
"type": "function"
213+
},
214+
{
215+
"inputs": [
216+
{ "internalType": "uint256", "name": "_nftId", "type": "uint256" },
217+
{ "internalType": "address", "name": "_underlyingAsset", "type": "address" },
218+
{ "internalType": "uint256", "name": "_paybackAmount", "type": "uint256" }
219+
],
220+
"name": "paybackExactAmount",
221+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
222+
"stateMutability": "nonpayable",
223+
"type": "function"
224+
},
225+
{
226+
"inputs": [{ "internalType": "uint256", "name": "_nftId", "type": "uint256" }],
227+
"name": "paybackExactAmountETH",
228+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
229+
"stateMutability": "payable",
230+
"type": "function"
231+
},
232+
{
233+
"inputs": [
234+
{ "internalType": "uint256", "name": "_nftId", "type": "uint256" },
235+
{ "internalType": "address", "name": "_underlyingAsset", "type": "address" },
236+
{ "internalType": "uint256", "name": "_shares", "type": "uint256" }
237+
],
238+
"name": "paybackExactShares",
239+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
240+
"stateMutability": "nonpayable",
241+
"type": "function"
242+
},
243+
{
244+
"inputs": [{ "internalType": "address", "name": "_proposedOwner", "type": "address" }],
245+
"name": "proposeOwner",
246+
"outputs": [],
247+
"stateMutability": "nonpayable",
248+
"type": "function"
249+
},
250+
{
251+
"inputs": [],
252+
"name": "proposedMaster",
253+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
254+
"stateMutability": "view",
255+
"type": "function"
256+
},
257+
{
258+
"inputs": [],
259+
"name": "renounceOwnership",
260+
"outputs": [],
261+
"stateMutability": "nonpayable",
262+
"type": "function"
263+
},
264+
{
265+
"inputs": [],
266+
"name": "sendingProgressAaveHub",
267+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
268+
"stateMutability": "view",
269+
"type": "function"
270+
},
271+
{
272+
"inputs": [
273+
{ "internalType": "address", "name": "_underlyingAsset", "type": "address" },
274+
{ "internalType": "address", "name": "_aaveToken", "type": "address" }
275+
],
276+
"name": "setAaveTokenAddress",
277+
"outputs": [],
278+
"stateMutability": "nonpayable",
279+
"type": "function"
280+
},
281+
{
282+
"inputs": [
283+
{ "internalType": "address[]", "name": "_underlyingAssets", "type": "address[]" },
284+
{ "internalType": "address[]", "name": "_aaveTokens", "type": "address[]" }
285+
],
286+
"name": "setAaveTokenAddressBulk",
287+
"outputs": [],
288+
"stateMutability": "nonpayable",
289+
"type": "function"
290+
},
291+
{
292+
"inputs": [{ "internalType": "address", "name": "_securityAddress", "type": "address" }],
293+
"name": "setWiseSecurity",
294+
"outputs": [],
295+
"stateMutability": "nonpayable",
296+
"type": "function"
297+
},
298+
{
299+
"inputs": [
300+
{ "internalType": "address", "name": "_underlyingAsset", "type": "address" },
301+
{ "internalType": "bool", "name": "_isAave", "type": "bool" }
302+
],
303+
"name": "skimAave",
304+
"outputs": [],
305+
"stateMutability": "nonpayable",
306+
"type": "function"
307+
},
308+
{
309+
"inputs": [
310+
{ "internalType": "uint256", "name": "_nftId", "type": "uint256" },
311+
{ "internalType": "address", "name": "_underlyingAsset", "type": "address" },
312+
{ "internalType": "uint256", "name": "_withdrawAmount", "type": "uint256" }
313+
],
314+
"name": "withdrawExactAmount",
315+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
316+
"stateMutability": "nonpayable",
317+
"type": "function"
318+
},
319+
{
320+
"inputs": [
321+
{ "internalType": "uint256", "name": "_nftId", "type": "uint256" },
322+
{ "internalType": "uint256", "name": "_withdrawAmount", "type": "uint256" }
323+
],
324+
"name": "withdrawExactAmountETH",
325+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
326+
"stateMutability": "nonpayable",
327+
"type": "function"
328+
},
329+
{
330+
"inputs": [
331+
{ "internalType": "uint256", "name": "_nftId", "type": "uint256" },
332+
{ "internalType": "address", "name": "_underlyingAsset", "type": "address" },
333+
{ "internalType": "uint256", "name": "_shareAmount", "type": "uint256" }
334+
],
335+
"name": "withdrawExactShares",
336+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
337+
"stateMutability": "nonpayable",
338+
"type": "function"
339+
},
340+
{
341+
"inputs": [
342+
{ "internalType": "uint256", "name": "_nftId", "type": "uint256" },
343+
{ "internalType": "uint256", "name": "_shareAmount", "type": "uint256" }
344+
],
345+
"name": "withdrawExactSharesETH",
346+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
347+
"stateMutability": "nonpayable",
348+
"type": "function"
349+
},
350+
{ "stateMutability": "payable", "type": "receive" }
351+
]

0 commit comments

Comments
 (0)