Skip to content

Add slippage protection to "swap" and "transfer" #644

@Jackalgirl

Description

@Jackalgirl

Currently, the options for protecting against sandwich attacks/front-running that are in place for btcli st add:

--tolerance,--rate-tolerance
--safe-staking,--safe
--no-safe-staking,--unsafe

are not available for swap or transfer. Both swap and transfer allow for moving of stakes across subnets, which results in an unstake-and-stake operation in the back-end, which means that there is an opportunity for the operation to be attacked.

Although it may be that the default 5% tolerance automatically applies, users should be able to increase the tolerance (or even decrease it, if they want to be more risky).

I recommend that you add these three options to swap and transfer so that those commands are consistent with add.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions