This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with | |
combined as ( | |
select | |
"from" as addr, | |
"blockTimestamp", | |
pool | |
from | |
indexer_blue."AddLiquidity" | |
union | |
select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE MATERIALIZED VIEW IF NOT EXISTS daily_volume AS | |
WITH parameters AS ( | |
SELECT | |
'0x9cdAA94733a682013Ff8AfD72BA59FB63619C98d' AS pool_addr, | |
EXTRACT(EPOCH FROM NOW() - INTERVAL '24 hours') AS last_time | |
), | |
combined AS ( | |
SELECT amount, "blockTimestamp", pool | |
FROM "AddLiquidity" | |
WHERE "blockTimestamp" >= (SELECT last_time FROM parameters) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import { | |
ChartConfig, | |
ChartContainer, | |
ChartLegend, | |
ChartLegendContent, | |
ChartTooltip, | |
ChartTooltipContent, | |
} from "@/components/ui/chart"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------Init | |
>> payoff | long 5e-05, short 5e-05 | |
LC: 1.0 SC: 1.0 | |
LP value 3000, liquidity 0.0 | |
K 3 Reserve: 0.0001 alpha:5e-05 beta:5e-05 | |
LC 1.0 SC 1.0 | |
x %s p %s 1.0 3000 | |
--------------LP added | |
>> payoff | long 5e-05, short 5e-05 | |
LC: 79.37010551174308 SC: 0.012599202099486268 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pools.dex import Dex | |
from pools.heplers import plot_curves | |
k = 3 | |
x = 1 | |
price = 3000 | |
h = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.minimap.enabled": false, | |
"workbench.startupEditor": "none", | |
"vim.easymotion": true, | |
"vim.incsearch": true, | |
"vim.useSystemClipboard": true, | |
"vim.useCtrlKeys": true, | |
"vim.hlsearch": true, | |
"vim.insertModeKeyBindings": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Root { | |
// calculates a^(1/n) to dp decimal places | |
// maxIts bounds the number of iterations performed | |
function nthRoot(uint _a, uint _n, uint _dp, uint _maxIts) pure public returns(uint) { | |
assert (_n > 1); | |
// The scale factor is a crude way to turn everything into integer calcs. | |
// Actually do (a * (10 ^ ((dp + 1) * n))) ^ (1/n) | |
// We calculate to one extra dp and round at the end |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"address": { | |
"ens_domain_name": null, | |
"hash": "0xf338f45A7EdA247340bB018288Caa7Fb4266E5ac", | |
"implementation_name": null, | |
"is_contract": false, | |
"is_verified": null, | |
"metadata": null, | |
"name": null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"address": { | |
"ens_domain_name": null, | |
"hash": "0x9a6C2890024F6fa7a61EbaD3Cc42a3Cd1cEEFF9C", | |
"implementation_name": null, | |
"is_contract": false, | |
"is_verified": null, | |
"metadata": null, | |
"name": null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"address": { | |
"ens_domain_name": null, | |
"hash": "0x00DDC08D535918425709DA3e50134AE7CFb2eFf9", | |
"implementation_name": null, | |
"is_contract": false, | |
"is_verified": null, | |
"metadata": null, | |
"name": null, |
NewerOlder