Skip to content

Commit

Permalink
add swap.coffee to volume squad
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandrkaekhtin committed Nov 26, 2024
1 parent 5cfc906 commit 4c26a4a
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 2 deletions.
15 changes: 15 additions & 0 deletions projects/defi/SwapCoffee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from models.project import DeFi

SwapCoffeeTVL = DeFi(
name="swap.coffee",
defillama_slug="swap.coffee",
url="https://swap.coffee/stake",
)


SwapCoffeeVolume = DeFi(
name="swap.coffee",
defillama_slug="swap.coffee",
url="https://swap.coffee/dex",
category="aggregators",
)
Binary file added projects/icons/defi_swap.coffee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 21 additions & 1 deletion seasons/S7_defi_scores.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,33 @@ Methodology details for each projects:
Includes all trades on any dex in case of transaction chain includes a swap with referrall address [UQBBPVrn4Y6F0Fci4j0mXuSAXmRDeE-nZCRIInQsNC9__8vG](https://tonviewer.com/EQBBPVrn4Y6F0Fci4j0mXuSAXmRDeE-nZCRIInQsNC9__5YD).
Volume is estimated for all swaps with TON, staked TON or USDT according to the methodology from [TON-ETL](https://github.com/re-doubt/ton-etl/blob/main/parser/parsers/message/swap_volume.py).

### RainbowSwap
### DEX Diamonds

The same methodology as for RainbowSwap, but with referral address [EQDZlJorSoB4cRJ5b8gt0qR4bkLfzVDVXe5SmMPcEl0TBNYv](https://tonviewer.com/EQDZlJorSoB4cRJ5b8gt0qR4bkLfzVDVXe5SmMPcEl0TBNYv).

### GasPump

Volume includes trades extracted from [Gaspump events](https://github.com/re-doubt/ton-etl/blob/main/parser/parsers/message/gaspump.py). USD value is calculated as a product of trade amount and price of TON at the time of trade.

### swap.coffee

The same methodology as for RainbowSwap, but with list of referral addresses:
* UQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_78Hc
* UQA8OiygwLotKehQvp285LjTvVsTj6OuHZxEDxxTo6PlJWYA
* UQCoFIQulMX1WciLYp7PUrxFqzIfsaUNo_FLDy1nDD0akyqT
* UQCo2ftIP6_GV9D1BPEctJmrSpyWE0i7Duv9VUKrUgKb-ycW
* UQAZoipwVLWfqgIklSmsKRbmRn-SOHlddH7L6MStlrP1hqTY
* UQD_uBfQr0Rr2_gbBVlDEgCb6CJ-dkoTKs7RCKeZytffxVY6
* UQCyW2VKRoUcVUXl9pc9AV5prdrQa97MMUr5tNNvDtEh6tEy
* UQBVdtzxVLDvdK4MO5goiNeGXJ4m0fsD38u2bo_99_yKN4zK
* UQCboL33t5GC9A8QDbxP7wqR0hIVOhDmAQwD0nJWC2e6T17t
* UQDpBMtznS0tXtOsh-dHbCkdp49Reh96JHxitxDSLPUAUHLx
* UQAG_gX-oEBVLOAJDPqak6U_7Pdjm3H460q-2-g5jJqYt8TA
* UQC2fgcn74hlpvCxbVdtZ5gTVSOWHXYHVGXbqC9uB5JBQW_f
* UQCXCdHQu9HQN-fEITMUPVA8IcEB5z0UMkXlNi2mL6hlNBOr
* UQCTd7dmlSgjcjVbWPOcldoeXBgP6NmZcRnpQIWliobe3xk5
* UQAIXBvCyFYdTTXdjgNec5vy-9Tjnqsw_lJ-RFJyA25Mr9M8


Full list of volume generating transaction and eligible users could be obtained using [the following query](sql/s7_defi_volume.sql).

Expand Down Expand Up @@ -89,6 +108,7 @@ Full list of participants and their impact on TVL could be obtained by [this que
|Rainbow Swap|Volume|1|
|DEX Diamonds|Volume|1|
|GasPump|Volume|5|
|swap.coffee|Volume|1|
|Aqua protocol|TVL|15|
|JVault|TVL|10|
|DAOLama|TVL|15|
Expand Down
42 changes: 41 additions & 1 deletion seasons/sql/s7_defi_volume.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,54 @@ with swaps as (
), gaspump_points as (
select address, floor(sum(volume_usd) / 20.) * 5 as points from gaspump
group by 1
), swapcoffee_referral_addresses as (
select '0:99FE957A109352AFA5E9BCF69AF885644FA226AA488F7ED44C3880893F507FEF' as referral_address
union all
select '0:3C3A2CA0C0BA2D29E850BE9DBCE4B8D3BD5B138FA3AE1D9C440F1C53A3A3E525' as referral_address
union all
select '0:A814842E94C5F559C88B629ECF52BC45AB321FB1A50DA3F14B0F2D670C3D1A93' as referral_address
union all
select '0:A8D9FB483FAFC657D0F504F11CB499AB4A9C961348BB0EEBFD5542AB52029BFB' as referral_address
union all
select '0:19A22A7054B59FAA02249529AC2916E6467F9238795D747ECBE8C4AD96B3F586' as referral_address
union all
select '0:FFB817D0AF446BDBF81B05594312009BE8227E764A132ACED108A799CAD7DFC5' as referral_address
union all
select '0:B25B654A46851C5545E5F6973D015E69ADDAD06BDECC314AF9B4D36F0ED121EA' as referral_address
union all
select '0:5576DCF154B0EF74AE0C3B982888D7865C9E26D1FB03DFCBB66E8FFDF7FC8A37' as referral_address
union all
select '0:9BA0BDF7B79182F40F100DBC4FEF0A91D212153A10E6010C03D272560B67BA4F' as referral_address
union all
select '0:E904CB739D2D2D5ED3AC87E7476C291DA78F517A1F7A247C62B710D22CF50050' as referral_address
union all
select '0:06FE05FEA040552CE0090CFA9A93A53FECF7639B71F8EB4ABEDBE8398C9A98B7' as referral_address
union all
select '0:B67E0727EF8865A6F0B16D576D6798135523961D76075465DBA82F6E07924141' as referral_address
union all
select '0:9709D1D0BBD1D037E7C42133143D503C21C101E73D143245E5362DA62FA86534' as referral_address
union all
select '0:9377B76695282372355B58F39C95DA1E5C180FE8D9997119E94085A58A86DEDF' as referral_address
union all
select '0:085C1BC2C8561D4D35DD8E035E739BF2FBD4E39EAB30FE527E445272036E4CAF' as referral_address
), swapcoffee_traces as (
select distinct trace_id from swaps
join swapcoffee_referral_addresses using(referral_address)
), swapcoffee_swaps as (
select 'coffeeswap' as project, tx_hash, swap_user as address, volume_usd from swaps join swapcoffee_traces using(trace_id)
), swapcoffee_points as (
select address, floor(sum(volume_usd) / 20.) * 1 as points from swapcoffee_swaps
group by 1
), degens as (
select distinct address, 1 as degen from tol.enrollment_degen ed
), volume_points as (
select * from rainbow_points
union all
select * from tondiamonds_points
union all
select * from gaspump_points
union all
select * from tondiamonds_points
select * from swapcoffee_points
)
select address, sum(points) as points from volume_points
join degens using(address)
Expand Down

0 comments on commit 4c26a4a

Please sign in to comment.