<p></p>
<p><b>@ghubstan</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5103#discussion_r563884011">daemon/src/main/java/bisq/daemon/grpc/GrpcWalletsService.java</a>:</p>
<pre style='color:#555'>> +
+    final ServerInterceptor[] interceptors() {
+        Optional<ServerInterceptor> rateMeteringInterceptor = rateMeteringInterceptor();
+        return rateMeteringInterceptor.map(serverInterceptor ->
+                new ServerInterceptor[]{serverInterceptor}).orElseGet(() -> new ServerInterceptor[0]);
+    }
+
+    final Optional<ServerInterceptor> rateMeteringInterceptor() {
+        CallRateMeteringInterceptor defaultCallRateMeteringInterceptor =
+                new CallRateMeteringInterceptor(new HashMap<>() {{
+                    put("getBalances", new GrpcCallRateMeter(1, SECONDS));
+                    put("getAddressBalance", new GrpcCallRateMeter(1, SECONDS));
+                    put("getFundingAddresses", new GrpcCallRateMeter(1, SECONDS));
+                    put("getUnusedBsqAddress", new GrpcCallRateMeter(1, SECONDS));
+                    put("sendBsq", new GrpcCallRateMeter(1, MINUTES));
+                    put("sendBtc", new GrpcCallRateMeter(1, MINUTES));
</pre>
<p>This is not to protect against malicious attacks.  A lot more analysis is needed for that.</p>
<p>The rate metering is to help prevent scripting mistakes.  We don't want anyone accidentally spamming the network with a create offer loop, or anyone accidentally emptying her own wallet.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/5103#discussion_r563884011">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNRIUJU7ZXRIYB6KHH3S3WPT5ANCNFSM4WOYERBA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNVMINRLE2W5Z3DHCLTS3WPT5A5CNFSM4WOYERBKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOEJHQV3Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/5103#discussion_r563884011",
"url": "https://github.com/bisq-network/bisq/pull/5103#discussion_r563884011",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>