{"id":8372,"date":"2024-10-11T13:21:43","date_gmt":"2024-10-11T11:21:43","guid":{"rendered":"https:\/\/oopm.org\/?page_id=8372"},"modified":"2024-11-26T14:37:28","modified_gmt":"2024-11-26T13:37:28","slug":"17-3-2-1-money-mule-example","status":"publish","type":"page","link":"https:\/\/oopm.org\/?page_id=8372","title":{"rendered":"18.3.2.1 Money mule example"},"content":{"rendered":"<div class=\"pdfprnt-buttons pdfprnt-buttons-page pdfprnt-top-right\"><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages8372&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"View PDF\" \/><\/a><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages8372&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>\n<p class=\"wp-block-paragraph\">As mentioned, the scenario for the&nbsp;<code>Accounts<\/code>&nbsp;being subject for observation, and for&nbsp;<code>Customer<\/code>&nbsp;and&nbsp;<code>alarm<\/code>&nbsp;to be observers is that the bank on regular basis go through all its account to find if there has been any issue with the transactions on accounts. This may be that the transactions form a suspicious pattern, e.g. because the account has been hacked.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a simple example we consider the case of money mules. A money mule is someone who transfers (typically illegally acquired) money on behalf of someone else. Money mules can move money in various ways, including through bank accounts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some money mules know they are supporting criminal enterprises; others are unaware that they are helping criminals profit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Money mules often receive a commission for their service, or they might provide assistance because they believe they have a trusting or romantic relationship with the individual who is asking for help.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Acting as a money mule is illegal, therefore the customer is also included as an observer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the purpose of simplicity we assume that money muling takes place in one day, i.e. there is a deposit of a certain amount and a<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\">&nbsp;<\/mark>withdraw<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\"> <\/mark>of the same amount on the same day. This activity may not be money muling, but it is still worth being reported as an issue. In real life banking there has to be a pattern of this pair of <code>deposit<\/code>\/<code>withdraw<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Account<\/code>&nbsp;will for this purpose have the method&nbsp;<code>checkTransactions<\/code> that goes through all transactions on a given day and execute <code>asSubject.notifyObservers<\/code> for each occurrence of a <code>deposit<\/code> and <code>withdraw<\/code> of the same <code>amount<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>class<\/strong> Account(owner: <strong>ref<\/strong> Customer):\n   -\"-\n   checkTransactions:\n      transactionsOfToday.scan\n         if (current.what = \"deposit\") :then\n            amount: <strong>var<\/strong> Real  \n            amount := current.whichAmount\n            scanTail \n               if (current.what = \"withdraw\") :then\n                  if (current.whichAmount = amount) :then \n                     asSubject.notifyObservers<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The method <code>scanTail<\/code> is defined in <code>scan<\/code> and iterates over the rest of the elements in the <code>Set<\/code>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<code>Bank<\/code>&nbsp;object (or some object within the&nbsp;<code>Bank<\/code>) calls this method every day<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-color-3-color\"> <\/mark>for each&nbsp;<code>Account<\/code>&nbsp;object in the list of accounts:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\ntheAccountsFile: <strong>obj<\/strong> OrderedList(#Account)\n...\ntheAccountsFile.scan\n   current.checkTransactions <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The following Sequence Diagram shows the sequence of method calls for a partial run.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"675\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/AccountAlarmOSD-1-1024x675.jpg\" alt=\"\" class=\"wp-image-9037\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/AccountAlarmOSD-1-1024x675.jpg 1024w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/AccountAlarmOSD-1-300x198.jpg 300w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/AccountAlarmOSD-1-768x507.jpg 768w, https:\/\/oopm.org\/wp-content\/uploads\/2024\/10\/AccountAlarmOSD-1.jpg 1140w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<div style=\"display:flex; gap:10px;justify-content:center\" class=\"wps-pgfw-pdf-generate-icon__wrapper-frontend\">\n\t\t<a  href=\"https:\/\/oopm.org?action=genpdf&amp;id=8372\" class=\"pgfw-single-pdf-download-button\" ><img src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-generator-for-wp\/admin\/src\/images\/PDF_Tray.svg\" title=\"Generate PDF\" style=\"width:auto; height:45px;\"><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>As mentioned, the scenario for the&nbsp;Accounts&nbsp;being subject for observation, and for&nbsp;Customer&nbsp;and&nbsp;alarm&nbsp;to be observers is that the bank on regular basis go through all its account to find if there has been any issue with the transactions on accounts. This may be that the transactions form a suspicious pattern, e.g. because the account has been hacked. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":7963,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-8372","page","type-page","status-publish","hentry"],"mb":[],"mfb_rest_fields":["title","gutenberg_elementor_mode"],"_links":{"self":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/8372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8372"}],"version-history":[{"count":17,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/8372\/revisions"}],"predecessor-version":[{"id":9885,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/8372\/revisions\/9885"}],"up":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/7963"}],"wp:attachment":[{"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}