# How can I create an ERC20 transfer alert with some conditions?

**URL:** <https://forum.openzeppelin.com/t/how-can-i-create-an-erc20-transfer-alert-with-some-conditions/38099>\
**Category:** Defender\
**Created:** [October 13, 2023, 10:25am UTC](https://forum.openzeppelin.com/t/how-can-i-create-an-erc20-transfer-alert-with-some-conditions/38099 "2023-10-13T10:25:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![naiba](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/naiba/32/19504_2.png) [@naiba](https://forum.openzeppelin.com/u/naiba)\
**Post date:** [October 13, 2023, 10:25am UTC](https://forum.openzeppelin.com/t/how-can-i-create-an-erc20-transfer-alert-with-some-conditions/38099/1 "2023-10-13T10:25:49Z")

</div>

for example transfer amount gather than half balance

---

<div class="post-metadata">

**Author:** ![emnul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/emnul/32/18922_2.png) [@emnul](https://forum.openzeppelin.com/u/emnul)\
**Post date:** [November 7, 2023, 10:39pm UTC](https://forum.openzeppelin.com/t/how-can-i-create-an-erc20-transfer-alert-with-some-conditions/38099/2 "2023-11-07T22:39:48Z")

</div>

You could create a custom event called `TransferAlert` on the contract that emits the current balance and transfer amount every time the transfer function is called. Then you could create a Defender Monitor that monitors for this event and gets triggered when transferAmount \> currentBalance / 2
