From 79afa5cb8018cd263b7820bdcb922998a4d80527 Mon Sep 17 00:00:00 2001 From: Alexandr Kazachenko Date: Thu, 12 Dec 2024 19:03:53 +0500 Subject: [PATCH 1/6] fix: add more stablecoins in fees logic (#5192) --- libs/common-const/src/tokens.ts | 56 ++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/libs/common-const/src/tokens.ts b/libs/common-const/src/tokens.ts index d967bfe526..4aee4d2811 100644 --- a/libs/common-const/src/tokens.ts +++ b/libs/common-const/src/tokens.ts @@ -50,6 +50,51 @@ export const GNO_MAINNET = new TokenWithLogo( 'Gnosis', ) +const FRAX_MAINNET = new TokenWithLogo( + 'https://assets.coingecko.com/coins/images/13422/thumb/frax_logo.png?1608476506', + SupportedChainId.MAINNET, + '0x853d955aCEf822Db058eb8505911ED77F175b99e', + 18, + 'FRAX', + 'Frax', +) + +const GUSD_MAINNET = new TokenWithLogo( + 'https://assets.coingecko.com/coins/images/5992/thumb/gemini-dollar-gusd.png?1536745278', + SupportedChainId.MAINNET, + '0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd', + 2, + 'GUSD', + 'Gemini Dollar', +) + +const LUSD_MAINNET = new TokenWithLogo( + 'https://assets.coingecko.com/coins/images/14666/thumb/Group_3.png?1617631327', + SupportedChainId.MAINNET, + '5f98805A4E8be255a32880FDeC7F6728C6568bA0', + 18, + 'LUSD', + 'Liquity USD', +) + +const PYUSD_MAINNET = new TokenWithLogo( + 'https://assets.coingecko.com/coins/images/31212/large/PYUSD_Logo_%282%29.png?1691458314', + SupportedChainId.MAINNET, + '0x6c3ea9036406852006290770BEdFcAbA0e23A0e8', + 6, + 'PYUSD', + 'PayPal USD', +) + +const sUSD_MAINNET = new TokenWithLogo( + 'https://assets.coingecko.com/coins/images/5013/thumb/sUSD.png?1616150765', + SupportedChainId.MAINNET, + '0x57Ab1ec28D129707052df4dF418D58a2D46d5f51', + 18, + 'sUSD', + 'Synth sUSD', +) + // Gnosis chain export const XDAI_SYMBOL = 'XDAI' export const XDAI_NAME = 'xDai' @@ -455,7 +500,16 @@ const SDAI_GNOSIS_CHAIN_ADDRESS = '0xaf204776c7245bf4147c2612bf6e5972ee483701' const GBPE_GNOSIS_CHAIN_ADDRESS = '0x5cb9073902f2035222b9749f8fb0c9bfe5527108' // Not used for fees -const MAINNET_STABLECOINS = [USDC_MAINNET.address, USDT.address, DAI.address].map((t) => t.toLowerCase()) +const MAINNET_STABLECOINS = [ + USDC_MAINNET.address, + USDT.address, + DAI.address, + FRAX_MAINNET.address, + GUSD_MAINNET.address, + LUSD_MAINNET.address, + PYUSD_MAINNET.address, + sUSD_MAINNET.address, +].map((t) => t.toLowerCase()) // NOTE: whenever this list is updated, make sure to update the docs section regarding the volume fees // https://github.com/cowprotocol/docs/blob/main/docs/governance/fees/fees.md?plain=1#L40 From 9499ba97ba2eef748579660237021c4a2259b41c Mon Sep 17 00:00:00 2001 From: Alexandr Kazachenko Date: Thu, 12 Dec 2024 19:06:39 +0500 Subject: [PATCH 2/6] chore: release main (#5193) --- .release-please-manifest.json | 2 +- libs/common-const/CHANGELOG.md | 7 +++++++ libs/common-const/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ff93bdda83..1d17758561 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -7,7 +7,7 @@ "apps/widget-configurator": "1.10.0", "libs/analytics": "1.9.0", "libs/assets": "1.11.0", - "libs/common-const": "1.12.1", + "libs/common-const": "1.12.2", "libs/common-hooks": "1.6.0", "libs/common-utils": "1.8.0", "libs/core": "1.5.0", diff --git a/libs/common-const/CHANGELOG.md b/libs/common-const/CHANGELOG.md index ef891dc66a..eca7ba548c 100644 --- a/libs/common-const/CHANGELOG.md +++ b/libs/common-const/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.12.2](https://github.com/cowprotocol/cowswap/compare/common-const-v1.12.1...common-const-v1.12.2) (2024-12-12) + + +### Bug Fixes + +* add more stablecoins in fees logic ([#5192](https://github.com/cowprotocol/cowswap/issues/5192)) ([79afa5c](https://github.com/cowprotocol/cowswap/commit/79afa5cb8018cd263b7820bdcb922998a4d80527)) + ## [1.12.1](https://github.com/cowprotocol/cowswap/compare/common-const-v1.12.0...common-const-v1.12.1) (2024-12-12) diff --git a/libs/common-const/package.json b/libs/common-const/package.json index cd6878a981..a1107af315 100644 --- a/libs/common-const/package.json +++ b/libs/common-const/package.json @@ -1,6 +1,6 @@ { "name": "@cowprotocol/common-const", - "version": "1.12.1", + "version": "1.12.2", "main": "./index.js", "types": "./index.d.ts", "exports": { From 6bd20155a2211bba95e5cdd8dab2e108b4783a13 Mon Sep 17 00:00:00 2001 From: Alexandr Kazachenko Date: Thu, 12 Dec 2024 19:36:33 +0500 Subject: [PATCH 3/6] fix(cow-fi): add info about base launch (#5194) --- .../app/(main)/legal/cowswap-terms/page.tsx | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/apps/cow-fi/app/(main)/legal/cowswap-terms/page.tsx b/apps/cow-fi/app/(main)/legal/cowswap-terms/page.tsx index 6c77e90291..0dc30cb67d 100644 --- a/apps/cow-fi/app/(main)/legal/cowswap-terms/page.tsx +++ b/apps/cow-fi/app/(main)/legal/cowswap-terms/page.tsx @@ -42,7 +42,7 @@ export default function Page() {

- Last updated: September 2024 + Last updated: December 2024

These Terms of Use (the "Terms") govern your access to{' '} @@ -679,6 +679,44 @@ export default function Page() { modification to or deletion of a provision or part-provision under this clause shall not affect the validity and enforceability of the rest of these Terms.

{' '} +

COW Token Giveaway, Base Launch: Terms and Conditions

+

1. Introduction

+

By participating in the COW Token Giveaway, you agree to these Terms and Conditions.

+

2. Eligibility

+

+ 18+ years old. Not an employee or affiliate of the Organizer. Must have a valid compatible wallet. Must + follow CoW Protocol on X. Void where prohibited. +

+

3. Giveaway Period

+

From 2024-12-12 at the time of the post on the X Platform to 2024-12-31, at 11:59 PM UTC.

+

4. How to Enter

+

+ Trade on Base using CoW Swap during the Giveaway Period. Quote Tweet the Giveaway announcement with your + trade's transaction hash. One entry per eligible transaction. +

+

5. Prize

+

+ 10,000 COW tokens distributed among randomly selected winners. The Organiser will determine the number of + winners and token allocation at its discretion. +

+

6. Winner Selection

+

Random selection from eligible entries. Odds depend on the number of entries.

+

7. Winner Notification

+

Winners announced on X within 15 days after the Giveaway Period.

+

8. Public Blockchain

+

+ Blockchain transactions are public and immutable. Sharing your transaction hash may make your wallet and + transaction details public and related to your X account. +

+

9. General Conditions

+

+ Organisers can disqualify entries or modify/cancel the Giveaway. Not responsible for technical issues. + Subject to applicable laws. The organiser's decisions are final. +

+

10. Limitation of Liability

+

Organiser not liable for losses related to the Giveaway or prize. COW token value may fluctuate.

+

11. Governing Law

+

Governed by the laws of England and Wales

From 83e40507cb1ac9072b01438ffbd9fe16b50aebd4 Mon Sep 17 00:00:00 2001 From: Alexandr Kazachenko Date: Thu, 12 Dec 2024 19:53:51 +0500 Subject: [PATCH 4/6] chore: release main (#5195) --- .release-please-manifest.json | 2 +- apps/cow-fi/CHANGELOG.md | 7 +++++++ apps/cow-fi/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1d17758561..7ee11b1497 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -18,7 +18,7 @@ "libs/types": "1.5.0", "libs/ui": "1.16.0", "libs/wallet": "1.7.0", - "apps/cow-fi": "1.19.0", + "apps/cow-fi": "1.19.1", "libs/wallet-provider": "1.0.0", "libs/ui-utils": "1.1.0", "libs/abis": "1.2.0", diff --git a/apps/cow-fi/CHANGELOG.md b/apps/cow-fi/CHANGELOG.md index a0c0c265d9..d90ba6d924 100644 --- a/apps/cow-fi/CHANGELOG.md +++ b/apps/cow-fi/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.19.1](https://github.com/cowprotocol/cowswap/compare/cow-fi-v1.19.0...cow-fi-v1.19.1) (2024-12-12) + + +### Bug Fixes + +* **cow-fi:** add info about base launch ([#5194](https://github.com/cowprotocol/cowswap/issues/5194)) ([6bd2015](https://github.com/cowprotocol/cowswap/commit/6bd20155a2211bba95e5cdd8dab2e108b4783a13)) + ## [1.19.0](https://github.com/cowprotocol/cowswap/compare/cow-fi-v1.18.0...cow-fi-v1.19.0) (2024-12-11) diff --git a/apps/cow-fi/package.json b/apps/cow-fi/package.json index 8869d00943..736cfbb26c 100644 --- a/apps/cow-fi/package.json +++ b/apps/cow-fi/package.json @@ -1,6 +1,6 @@ { "name": "@cowprotocol/cow-fi", - "version": "1.19.0", + "version": "1.19.1", "description": "CoW DAO website", "main": "index.js", "author": "", From 8893f35e177f86eef15ad2790034b705cf91e349 Mon Sep 17 00:00:00 2001 From: Alexandr Kazachenko Date: Thu, 12 Dec 2024 20:02:19 +0500 Subject: [PATCH 5/6] fix(cowfi): reduce cms requests cache time to 5 min (#5196) --- apps/cow-fi/next.config.js | 2 +- apps/cow-fi/services/cms/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/cow-fi/next.config.js b/apps/cow-fi/next.config.js index 914f6503b2..a22161afeb 100644 --- a/apps/cow-fi/next.config.js +++ b/apps/cow-fi/next.config.js @@ -100,7 +100,7 @@ const nextConfig = { headers: [ { key: 'Cache-Control', - value: 'public, s-maxage=60, stale-while-revalidate=600', + value: 'public, s-maxage=60, stale-while-revalidate=300', }, ], }, diff --git a/apps/cow-fi/services/cms/index.ts b/apps/cow-fi/services/cms/index.ts index ef79552118..a6a2555d91 100644 --- a/apps/cow-fi/services/cms/index.ts +++ b/apps/cow-fi/services/cms/index.ts @@ -4,9 +4,9 @@ import qs from 'qs' import { toQueryParams } from 'util/queryParams' import { getCmsClient } from '@cowprotocol/core' -import { DATA_CACHE_TIME_SECONDS } from '@/const/meta' const PAGE_SIZE = 50 +const CMS_CACHE_TIME = 5 * 60 // 5 min type Schemas = components['schemas'] export type Article = Schemas['ArticleListResponseDataItem'] @@ -33,7 +33,7 @@ export const client = getCmsClient() const clientAddons = { // https://github.com/openapi-ts/openapi-typescript/issues/1569#issuecomment-1982247959 - fetch: (request: unknown) => fetch(request as Request, { next: { revalidate: DATA_CACHE_TIME_SECONDS } }), + fetch: (request: unknown) => fetch(request as Request, { next: { revalidate: CMS_CACHE_TIME } }), } /** From afb9fff48f2185979fd8d281a3e6b42703374274 Mon Sep 17 00:00:00 2001 From: Alexandr Kazachenko Date: Thu, 12 Dec 2024 20:11:07 +0500 Subject: [PATCH 6/6] chore: release main (#5197) --- .release-please-manifest.json | 2 +- apps/cow-fi/CHANGELOG.md | 7 +++++++ apps/cow-fi/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7ee11b1497..e34618b6bd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -18,7 +18,7 @@ "libs/types": "1.5.0", "libs/ui": "1.16.0", "libs/wallet": "1.7.0", - "apps/cow-fi": "1.19.1", + "apps/cow-fi": "1.19.2", "libs/wallet-provider": "1.0.0", "libs/ui-utils": "1.1.0", "libs/abis": "1.2.0", diff --git a/apps/cow-fi/CHANGELOG.md b/apps/cow-fi/CHANGELOG.md index d90ba6d924..3b35ad3415 100644 --- a/apps/cow-fi/CHANGELOG.md +++ b/apps/cow-fi/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.19.2](https://github.com/cowprotocol/cowswap/compare/cow-fi-v1.19.1...cow-fi-v1.19.2) (2024-12-12) + + +### Bug Fixes + +* **cowfi:** reduce cms requests cache time to 5 min ([#5196](https://github.com/cowprotocol/cowswap/issues/5196)) ([8893f35](https://github.com/cowprotocol/cowswap/commit/8893f35e177f86eef15ad2790034b705cf91e349)) + ## [1.19.1](https://github.com/cowprotocol/cowswap/compare/cow-fi-v1.19.0...cow-fi-v1.19.1) (2024-12-12) diff --git a/apps/cow-fi/package.json b/apps/cow-fi/package.json index 736cfbb26c..bdb5bfaaa7 100644 --- a/apps/cow-fi/package.json +++ b/apps/cow-fi/package.json @@ -1,6 +1,6 @@ { "name": "@cowprotocol/cow-fi", - "version": "1.19.1", + "version": "1.19.2", "description": "CoW DAO website", "main": "index.js", "author": "",