I'm core backend engineer at CandyPay (https://twitter.com/candypayfun), we're trying to bring the seamless mobile-native UX to Solana's NFT ecosystem with the help of Solana Pay. We have recently created a Gasless NFT drop (https://www.solaneyes.com/address/GnUeJeGFYnk669oGedBvV1t3qByD8eLttjLSSgCvwGRJ) for Dilli Hackerhouse, but unfortunately, all the NFTs got minted and drained our payer's wallet funds.
The attacker had sent mass POST
requests to our API's /mint
route and fetched the raw base58 transaction object from the route's response. The attacker had simulated and signed the transaction programmatically via newly-created wallets. The minted NFTs are been then listed on MagicEden.
The obvious solution would be to add ratelimiting, but it isn't the permanent solution to this issue.
Is there any kind of way to exactly know whether the incoming API request is from Phantom/Solflare/Glow? With the help of this we can easily filter out the spam API requests
Additional context