Skip to content

Commit

Permalink
TW-1565: Increase swap fee and cashback (#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
lendihop authored Oct 17, 2024
1 parent 9a82873 commit d9b73a8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
7 changes: 6 additions & 1 deletion public/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3111,7 +3111,12 @@
"message": "Cashback"
},
"swapCashbackDescription": {
"message": "Swap more than 10$ and receive 0.175% from the swapped amount in the TKEY token as a cashback"
"message": "Swap more than 10$$ and receive $text$% from the swapped amount in the TKEY token as a cashback",
"placeholders": {
"text": {
"content": "$1"
}
}
},
"jumpInTezos": {
"message": "Jump in Tezos right now!"
Expand Down
7 changes: 6 additions & 1 deletion public/_locales/en_GB/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,12 @@
"message": "Cashback"
},
"swapCashbackDescription": {
"message": "Swap more than 10$ and receive 0.175% from the swapped amount in the TKEY token as a cashback"
"message": "Swap more than 10$$ and receive $text$% from the swapped amount in the TKEY token as a cashback",
"placeholders": {
"text": {
"content": "$1"
}
}
},
"subscribeToNewsletter": {
"message": "Subscribe to our Newsletter"
Expand Down
3 changes: 2 additions & 1 deletion src/app/templates/SwapForm/SwapForm.tippy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { t } from 'lib/i18n';
import { SWAP_CASHBACK_PERCENT } from 'lib/route3/constants';

export const feeInfoTippyProps = {
trigger: 'mouseenter',
Expand All @@ -10,6 +11,6 @@ export const feeInfoTippyProps = {
export const cashbackInfoTippyProps = {
trigger: 'mouseenter',
hideOnClick: false,
content: t('swapCashbackDescription'),
content: t('swapCashbackDescription', [SWAP_CASHBACK_PERCENT]) as string,
animation: 'shift-away-subtle'
};
5 changes: 3 additions & 2 deletions src/app/templates/SwapForm/SwapForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ import {
ROUTING_FEE_SLIPPAGE_RATIO,
SWAP_THRESHOLD_TO_GET_CASHBACK,
TEMPLE_TOKEN,
ATOMIC_INPUT_THRESHOLD_FOR_FEE_FROM_INPUT
ATOMIC_INPUT_THRESHOLD_FOR_FEE_FROM_INPUT,
ROUTING_FEE_PERCENT,
SWAP_CASHBACK_PERCENT
} from 'lib/route3/constants';
import { isLiquidityBakingParamsResponse } from 'lib/route3/interfaces';
import { getPercentageRatio } from 'lib/route3/utils/get-percentage-ratio';
import { getRoute3TokenBySlug } from 'lib/route3/utils/get-route3-token-by-slug';
import { ROUTING_FEE_PERCENT, SWAP_CASHBACK_PERCENT } from 'lib/swap-router/config';
import { useAccount, useTezos } from 'lib/temple/front';
import { atomsToTokens, tokensToAtoms } from 'lib/temple/helpers';
import useTippy from 'lib/ui/useTippy';
Expand Down
3 changes: 2 additions & 1 deletion src/lib/route3/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export const LIQUIDITY_BAKING_PROXY_CONTRACT = 'KT1WLWMMm9MywjCqnA8wBAYy9QhUE1Lz
export const BURN_ADDREESS = 'tz1burnburnburnburnburnburnburjAYjjX';
export const ROUTING_FEE_ADDRESS = 'tz1UbRzhYjQKTtWYvGUWcRtVT4fN3NESDVYT';

const ROUTING_FEE_PERCENT = 0.35;
export const ROUTING_FEE_PERCENT = 0.6;
export const SWAP_CASHBACK_PERCENT = 0.3;
export const ROUTING_FEE_RATIO = getPercentageRatio(ROUTING_FEE_PERCENT);
export const ROUTING_FEE_SLIPPAGE_RATIO = 0.995;
export const MAX_ROUTING_FEE_CHAINS = 1;
Expand Down
2 changes: 0 additions & 2 deletions src/lib/swap-router/config.ts

This file was deleted.

0 comments on commit d9b73a8

Please sign in to comment.