Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Relay Fee to protect spamming attack #10

Merged
merged 13 commits into from
Jan 18, 2021
Merged

Conversation

yun-yeo
Copy link
Contributor

@yun-yeo yun-yeo commented Jan 18, 2021

Summary

Ethereum transaction fee is 100x bigger than Terra transaction fee, so a attacker can easily drain Shuttle fee pool(ETH) with small amount of Terra side asset by spamming transactions to Shuttle.

To prevent this case, we will charge shuttle fee in following equation.

max($1, 0.1% * amount)

Fee only charged when a user send an asset Terra => Ethereum.

We use various oracle sources to compute $1 value of asset. If a user sends smaller amount asset than $1 value, that tx will not be relayed to Ethereum side.

@yun-yeo yun-yeo requested a review from hanjukim January 18, 2021 08:25
terra/src/Oracle.ts Outdated Show resolved Hide resolved
terra/src/Oracle.ts Outdated Show resolved Hide resolved
terra/src/Monitoring.ts Show resolved Hide resolved
@hanjukim hanjukim added the enhancement New feature or request label Jan 18, 2021
@yun-yeo yun-yeo merged commit e87a524 into master Jan 18, 2021
@hanjukim hanjukim deleted the feature/relaying-fee branch July 12, 2021 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants