I am working on a private Stellar network with Docker and Stellar Laboratory.
I have deploy an asset with issuing and distributor accounts, but i want to establish some daily limits for withdrawals and deposits of my customers. How can I do it ?
I saw that I can add a maximum limit of tokens to an account during the Trust operation but it doesn't care about time. I also saw that I can use Stellar Smart Contracts "Time Bounds" to put limitations on the time period over which a transaction is valid. Maybe there is trick using this 2 functionnalities to solve my issue?
There is also the bridge & compliance servers that can be used I think but I did not really catch how to use them . Here there is a sendMax limit for the compliance, this is close to what I want : https://github.com/stellar/bridge-server/blob/master/src/github.com/stellar/gateway/protocols/bridge/payment.go
Thanks in advance
Sorry for the late I was on holidays.
Thanks for your response @sui, but I started to use a compliance server. I inspired from this Stellar documentation link to define my callbacks : compliance server but I have 2 questions :
1st point :
I can authorize a transaction with my callbacks but if i set the parameter "needs_auth" to true in compliance.cfg then my fetch_info callback doesn't receive any informations (request.body is undefined).
It is writted in the docs that the "needs_auth" parameter is used to check the information of a person receiving a payment. (link)
I can't access to the JSON AUTH_RESPONSE containing the field "dest_info". I don't understand to which server this response is sent.
Question 1) With needs_auth to true I only get the sender infos in my callbacks and not the destination infos (the 2nd call to fetch_info provide an undefined request.body), is it normal ?
UPDATE : Response to question 1 : the issue was that federation's SQL query was not responding the memo but only the stellar_address and account_id. So the 2nd call to fetch_info wasn't able to check KYC.
Solution in federation.cfg :
federation = 'SELECT id, name as memo, 'text' as memo_type FROM people WHERE name = ? AND domain = ?"
2nd Point :
I saw that the SEP6 can also provide verifications about limits but the implementations are currently not finished yet : SEP6 implementation 1 , SEP6 implementation 2
Question 2) Can i do the same verification than the SEP6 with my own compliance callbacks?