Description:Description\
StableSwapThreePool and StableSwapTwoPool pools have an amplicifation coefficient(A) that can be adjusted depending on the peg of the stablecoins in the pool and the needed liquidity concentration. This can happen after a pool is deployed when there is not sufficient concentration or when the stablecoin peg has been changed to allow better trading.
An admin can schedule changing of A with the ramp_A function and can set a valid and reasonable increase or decrease of A, which could expose the pool to a loss.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x79687f12e95bd5f9d790075c3250ef8857ee1403be91bfd137c9caedc4edcbe2 Severity: medium
Description: Description\
StableSwapThreePool
andStableSwapTwoPool
pools have an amplicifation coefficient(A) that can be adjusted depending on the peg of the stablecoins in the pool and the needed liquidity concentration. This can happen after a pool is deployed when there is not sufficient concentration or when the stablecoin peg has been changed to allow better trading.An admin can schedule changing of A with the
ramp_A
function and can set a valid and reasonable increase or decrease of A, which could expose the pool to a loss.There is a detailed report about a vulnerabilty in Curve which can be found https://medium.com/@peter_4205/curve-vulnerability-report-a1d7630140ec. To mitigate the issue, in Curve implementation, the amplicifation coefficient(A) is changed with some limitation shown Stableswap.vy#L1061-L1080,
And take
Attack Scenario\ Please check https://medium.com/@peter_4205/curve-vulnerability-report-a1d7630140ec and https://github.com/hats-finance/Common--Stableswap-0xd4d9a2772202ce33b24901d3fc94e95a84b37430/issues/39 for more details
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)