by abdullahkhalids · 2y ago · 0 comments
Amounts ending in 1 cent and 2 cents are rounded down to the nearest 10 cents;
Amounts ending in 3 cents and 4 cents are rounded up to the nearest 5 cents;
Amounts ending in 6 cents and 7 cents are rounded down to the nearest 5 cents;
Amounts ending in 8 cents and 9 cents are rounded up to the nearest 10 cents;
Amounts ending in 0 cent and 5 cents remain unchanged.
EDIT: I think if you send 12 cents, send [CADCASH/2 12] ( source = @user1 destination = @user2 )
It should result in sending 10 cents. "postings": [{"source": "user1",
"destination": "user2",
"amount": 10,
"asset": "CADCASH/2"}]
Can this happen?[1] https://www.canada.ca/en/revenue-agency/programs/about-canad...
For example, you could have something like this:
send [USD/2 *] (
source = @users:1234
destination = {
// first $1000 are taxed at 10%
max [USD/2 100000] to {
10% to @taxes
remaining kept
}
// Anything above that is, taxed at 20%
remaining to {
20% to @taxes
remaining kept
}
}
)
(You can test it on the playground, you'll just want to feed the "users:1234" account with an initial balance in the input section)