Anyone can build a bank: creating a new banking backend by Vlad Yatsenko — Transcript
Full transcript
- 0:00[Music]
- 0:05- thanks for coming over if it's a small
- 0:09room then you know the number of people
- 0:11want to attend so thanks thanks a lot
- 0:13for coming over even taking the space on
- 0:16on the floor it's so my name is Vlad
- 0:21Sankar like typically shot usually Lots
- 0:25it's hard to pronounce my full name for
- 0:27mature people
- 0:28I'm nan confounding city or evolute just
- 0:34the quick audience check how many people
- 0:36have heard of reveal it like crazy okay
- 0:41this is a good so I don't have to do
- 0:42long introduction of what River is today
- 0:47I'm gonna talk about building a bank in
- 0:51general what kind of challenges is there
- 0:52I'm gonna go even on the code level as
- 0:56well not too much in order to develop a
- 0:59conference so it's kind of a balance
- 1:03between domain and take some technical
- 1:05problems that's a typical for this
- 1:07domain as well so let's go so what is a
- 1:13bank in general in the past we used to
- 1:18like people used to imagine a bank like
- 1:21this building with insured columns and
- 1:25because banks needed to portray that
- 1:28they are very safe that can be trusted
- 1:29people bring money very physically and
- 1:33essentially there was the main purpose
- 1:35and then they started doing lending
- 1:37borrowing etc but this thing is changing
- 1:42right because it was very in efficient
- 1:44you had to cross distances you had to do
- 1:47a lot of physical content
- 1:49these days bank banks realizing that
- 1:52this is not working because of the wave
- 1:54of FinTech and we see a lot more of this
- 1:58happening with the old banks and it's
- 2:04because of rise of FinTech that happen
- 2:06due to different factors due to the
- 2:10financial crisis in 2008
- 2:13that regulate this allows me change the
- 2:16rules in such a way so that allows new
- 2:19engines to come into this market and we
- 2:23use that opportunity so but you know
- 2:26it's important to think what was the
- 2:29purpose of the bank in general right
- 2:31obviously like if it's of any almost any
- 2:34business is to make money as mentioned
- 2:39in the past people used to use banks as
- 2:42just trusted vault where they put money
- 2:45instead of keeping that money under
- 2:46their mattress and then the main
- 2:49business of the banks and it is still is
- 2:52boring at one extreme interest rates
- 2:56from some people and lending that money
- 3:00at high interest rates to other people
- 3:02and the business basically making this
- 3:04difference on on the interest rate these
- 3:10days with the thing it's etc and in its
- 3:14financial institutions yeah we do a lot
- 3:17moment not just borrowing and lending
- 3:20how we think about banking today it's
- 3:23card payments currency exchanges
- 3:25investments insurance all the controls
- 3:29to manage your money better like
- 3:31analytics budgeting saving accounts the
- 3:35security of your accounts expense
- 3:37management's all these things at least
- 3:39can go on the automation the API the
- 3:42open banking ones in Europe etc so
- 3:46there's a lot of things that are
- 3:47happening in banking in general and this
- 3:51is how we see today and you can even do
- 3:55some gifs with your with your money
- 3:59these days so but how we see it what
- 4:04what the the main purpose of the bank is
- 4:06to help you get most value are the money
- 4:10this is how we see our purpose in
- 4:13general despite we often used for mainly
- 4:18currency exchange travel this is our how
- 4:23we started with starting with that
- 4:25problem
- 4:26and I'm kind of naturally started
- 4:27growing I mean revolute as a business
- 4:30into other areas thinking about it's
- 4:33like how to help you to make more get
- 4:38more value out of your money
- 4:42hence yeah banks today look usually like
- 4:46vases and up and the cut and this is
- 4:49what what you see most of time this is
- 4:51the the new Association of the for the
- 4:53bank is not that big building as in the
- 4:56past just a little bit about revolu how
- 5:01we value our main cool thing is the
- 5:07multi currency our mission is to offer
- 5:10global multi-currency accounts with all
- 5:14the functionality around the accounts
- 5:17that's linked to your financial life we
- 5:22did at the moment by allowing you to
- 5:24hold up to 29 different currencies move
- 5:27them frequency without friction and fees
- 5:31and also we how to get exposure to five
- 5:37cryptocurrencies and we got to this
- 5:41point from when we launched in 2015
- 5:43those we support only three currencies
- 5:46through many currencies pounds euros and
- 5:48dollars and they have escalated and not
- 5:51working outside of Europe launching some
- 5:54in other markets in Asia in an America
- 5:57so we are heading towards this mission
- 6:01to making money frequency no truly
- 6:03frictionless truly all of us just to
- 6:09give you some perspective as well on our
- 6:11current skills so at the moment we are
- 6:13around five million users I put five
- 6:16million users because it's gonna hit
- 6:17probably the mark five million people in
- 6:20the next two days this is the volume of
- 6:25transactions with processing on the
- 6:26daily basis so it's it's quite sizable
- 6:31if you look at the industry in general
- 6:32just to give you again a perspective
- 6:34perspective the first payments in the UK
- 6:36the the biggest banks process
- 6:40that's many transactions a month so here
- 6:43we're talking about a lot of other
- 6:44transactions of course a lot of them are
- 6:46cut transactions but just in general get
- 6:48to give you perspective and how it looks
- 6:54now it's around ninety of bagging
- 6:58applications supporting all of this for
- 7:02mobile applications because we do i OS
- 7:05Android and we have products for retail
- 7:08and business and a bunch of web
- 7:12applications manually mainly for
- 7:13internal use and this all of this is
- 7:19built and supported by 220 people and
- 7:22this number is changing every week so
- 7:30how all this simple what you used to see
- 7:34a very simple interface right this is
- 7:37like how you imagine the bank at the
- 7:39back of it this is just a very
- 7:42high-level approximation of what's
- 7:45happening at the back end depending on
- 7:49size of institution like a financial
- 7:53solution would be doing just some of it
- 7:55delegating outsourcing to to partners
- 7:58a lot of it and within our case we do
- 8:02too much all of it
- 8:04we started initially with partnerships
- 8:07to our source things like compliance
- 8:10things like payment payment processing
- 8:16etc and people started bringing all of
- 8:19it in-house kind of getting closer to
- 8:22come to the last mile - now we have
- 8:26connectivity to many payment networks of
- 8:31cut cut payment networks like Visa and
- 8:34MasterCard its direct it's now in beta
- 8:37we're gonna be switching all of traffic
- 8:41to to our own connectivity soon then
- 8:45Faster Payments swift SEPA there's a lot
- 8:48of proprietary integrations with banks
- 8:50to make this whole system
- 8:53work efficiently and for you to just
- 8:56click a button and make it as soon as
- 9:00possible at no cost so but it was not
- 9:07that the big and complex from the
- 9:09beginning from the beginning was in the
- 9:11MVP right we called monolithic viable
- 9:14project product so it was in a way
- 9:19monolith which looked like this we are a
- 9:24Java house so we use the replicate we
- 9:30use relational databases for storage so
- 9:33many sounds too fancy like there's no
- 9:36scale etc but this is kind of the very
- 9:40foundational Salvage we do and we
- 9:42started just with this for applications
- 9:45one was the API that was powering
- 9:48powering the mobile apps used by users
- 9:51cut processing that would process the
- 9:55the cut transactions when you pay online
- 9:58or didn't point-of-sale and our
- 10:01back-office application and all of that
- 10:03was built kind of out of one code-based
- 10:06was mana rifle very simple the you're
- 10:09making changes through fracturing very
- 10:11simple when you have just one code base
- 10:13and just out of that it was just for
- 10:16applications built of deployments were
- 10:19like non don't I'm very fast 30 seconds
- 10:22to deploy any application so it was the
- 10:25life was very easy we would think we in
- 10:31from the beginning we went with
- 10:32PostgreSQL as a storage and we learnt
- 10:36learning early on how to scale progress
- 10:42as well have replication backups with it
- 10:45we purchased feels probably one of the
- 10:48best databases that exists today to
- 10:51which these things don't are not I would
- 10:55say not as difficult they may sound to a
- 10:57lot of application developers so yeah so
- 11:02we I mentioned for
- 11:04doing all of it with one codebase
- 11:08applications were stateless which
- 11:09allowed to do non time downtime
- 11:11deployments everything was easy to
- 11:14manage very easy to manage logs just
- 11:16from logging cessation doing your grab
- 11:20some logs the monitoring was very easy
- 11:24as well we would try to set up our own
- 11:27infrastructure with al haystack but
- 11:30eventually decided where when we started
- 11:32with only four people as the whole
- 11:34company so with only two technical
- 11:38people it was very very hard initially
- 11:40to manage all of that we decided to
- 11:43forego it and use nearly for monitoring
- 11:46which works pretty well usually to
- 11:50enable monitoring zero effort for Java
- 11:52applications with New Relic in yeah as I
- 11:59said we started this team with only two
- 12:02engineers including myself and then
- 12:03after almost a year of being in
- 12:05production we grew to four people and it
- 12:11was quite a change for us at the time
- 12:12and but we at the same time when we were
- 12:17building the product those known had
- 12:22experience building a bank before
- 12:24understanding different concepts what
- 12:28was important in general rights like
- 12:30where engineers usually are generalists
- 12:31we can know how to code and we can take
- 12:35any problem right give us enough time
- 12:37and we will solve it but there are
- 12:40certain areas so from financing industry
- 12:43what's important is correctness first of
- 12:45all like we always tend to think about
- 12:47complexity performance etc but the most
- 12:49important thing in in finance its
- 12:52correctness all right everything should
- 12:53be consistent that's why transactional
- 12:56behavior is like number-one priority and
- 12:58the typical way to do the transaction
- 13:01management if you know is to have this
- 13:04annotation based approach in Java right
- 13:06you put your annotations then do some
- 13:09IEP with spring or some other framework
- 13:11and very very easy right to define your
- 13:13transaction boundaries but as in this
- 13:17example you see
- 13:20this method like transfer money as for
- 13:23instance starts growing it this transfer
- 13:25money it's not just as easy just
- 13:28changing to balances with a lot of
- 13:29things you need to do do some
- 13:32validations fraud checks etc and that
- 13:35can become quite complex and then you
- 13:37say okay you know this is too much like
- 13:39why do I need to start transaction so
- 13:42early I need I want to optimize we
- 13:45release that connection sooner let's
- 13:49make the transfer logic block only
- 13:52transactional right and then we just do
- 13:54this we just unite your ID you did you
- 13:58say extract method for this block of
- 14:02code and this is what you get but what's
- 14:06wrong with it does anyone know what's
- 14:08wrong with this okay I'm glad there are
- 14:11people who we see the problem before the
- 14:16transactional notation was on the public
- 14:18method now it's in private and it
- 14:20doesn't apply anymore and if you don't
- 14:23have tests for every piece of logic we
- 14:26need to explicitly say this must be
- 14:28transactional you're gonna hit a big
- 14:30problem here as you like if we're
- 14:32talking about money then you start
- 14:33having consistencies and it seems
- 14:37initially oh why do we do this or
- 14:39because because it's it's very easy it's
- 14:43declarative way of doing it right that's
- 14:46what we're gonna generate and try to do
- 14:48not to be very empirical to use the
- 14:50declarative ways to do such things
- 14:52there's a more stable solution right is
- 14:57it less declarative but I don't think so
- 15:00but it always works there's no magic
- 15:02here at all right just explicitly say I
- 15:04want to call this block of code in
- 15:07transaction and since Java 8 it's very
- 15:09easy with lambdas the code doesn't look
- 15:12ugly anymore
- 15:13etc so this you know just using quote
- 15:20from Warren Buffett's rule number one
- 15:22never lose money but to never forget
- 15:25rule number one so in fairness it's it's
- 15:28super important we should never lose
- 15:31mine
- 15:32our money or customers money it's like
- 15:34it's like the most important thing
- 15:38especially consider these days all the
- 15:41money is in reality is virtual eyes it's
- 15:44like it's just numbers in some databases
- 15:47regardless on what the the financial
- 15:52institution is like unless you have that
- 15:54in cash this even that cash is still
- 15:56recorded some way to solve this problem
- 16:00on the other level as well you know we
- 16:04said we need to define a transaction
- 16:06button boundaries very clearly and in
- 16:09such a way so it doesn't so it's not
- 16:12fragile this something called free
- 16:16cancellation which is another important
- 16:17process because still there are too many
- 16:20different systems involved in processing
- 16:22financial transactions and we end up
- 16:25doing a lot of reconciliations
- 16:27especially when we cross borders when
- 16:29money goes out so of revolute to other
- 16:33banks and the other way around
- 16:35there is no transaction where right
- 16:38we cannot say okay let's do distribute
- 16:40transaction with a financial institution
- 16:42so we have another process called for
- 16:44cancellations which basically is about
- 16:46taking two data sets and making sure
- 16:48they they agree and of course due to
- 16:54this you know the story of SQL for us is
- 16:57like very obvious there's no
- 16:59considerations here for no SQL
- 17:02processing transactions no skill it is
- 17:05not really something you should consider
- 17:11just example of code that I wanted to
- 17:16show as well rational databases can do a
- 17:23lot of things that many java application
- 17:27developers are not aware of I've noticed
- 17:29one of these things is streaming on
- 17:34database level it's a called cursor in
- 17:36gdb sea level is called scrollable
- 17:39statements which means you don't have to
- 17:41create any complex batch processing if
- 17:44you want
- 17:45process efficiently a lot of data he
- 17:49just opened scorable statement behind
- 17:52the scenes I'm not showing the details
- 17:55of this because it's kind of in our case
- 17:56is hidden behind framework but here in
- 17:59this piece of code in this line here
- 18:03final processed standing always on a
- 18:06specific date it can be a lot of them
- 18:09and these things this is not a process
- 18:12that requires your immediate processing
- 18:16of the whole population on standing
- 18:18orders created by the users we need to
- 18:20post them on a specific date and that's
- 18:21important we can do it even sequential
- 18:24if want is but generally to process them
- 18:27efficiently so we don't have you know
- 18:29put all of that in memory you know or
- 18:32have very complex process bashing that
- 18:34just streaming from database and process
- 18:37as we go and whether we use will rely a
- 18:45lot on a library of you can call it
- 18:48framework as well
- 18:49it's called Juke if you've never tried
- 18:53it and you do SQL like I recommend Lucas
- 18:56is awesome is once you start using joke
- 18:58you never have mistakes in your SQL
- 19:02statements it's probably like I'm a big
- 19:05fan of of Juke and Lucas adder who is
- 19:09creator of it's in Montana right and
- 19:26another interesting problem in finish
- 19:28the domain is currencies of seems to be
- 19:34kind of simple it's you have one number
- 19:36to convert to another currency just
- 19:37multiply it by rate and you have amount
- 19:40in a different currency the rarity is
- 19:43how translation works there are always
- 19:47two rates bid and offer also called buy
- 19:50and sell and what I know if any of you
- 19:53still see or use the you know the brick
- 19:56and motar exchange bureaus
- 19:58apples they show you two rates right two
- 20:01columns and well see a lot of people
- 20:03even people would experience in infants
- 20:06an urgency they sometimes when they
- 20:07start thinking about this let's take a
- 20:09pause which one do I need to use like it
- 20:13can get tricky some but generally people
- 20:17make mistake all the time about this so
- 20:22we may be of course super simple for you
- 20:26is yes you put a number one one side it
- 20:29multiplied by the rate shown it will be
- 20:33the other number all right in the we
- 20:35kind of tried try to make it bit more
- 20:38clear to to our users and you know you
- 20:41don't have to have your own calculations
- 20:43in your head for us finally in the
- 20:48beginning and when we were building this
- 20:49like just currency exchange it's
- 20:54probably just the exchange rate class in
- 20:58our code base it has probably around 300
- 21:02lines just just that class and the whole
- 21:05area of currency exchange ended up
- 21:08because of kind of developers in the
- 21:11beginnings learning this space making
- 21:14mistakes in the back end and in the
- 21:17front end code so we ended up having
- 21:21probably more than hundred tests just
- 21:24around currency exchange so just to
- 21:31cover all the possible cases runnings
- 21:33etc and around crisis as well another
- 21:38problem that we have in this space is as
- 21:41we have this is another difference
- 21:44between the US and a lot of other
- 21:46fintechs Bank challenges etc where we
- 21:49kind of we try to solve this problem of
- 21:52currency coupla complexity and you know
- 21:56operating in different markets with
- 21:58different payment channels currencies
- 22:01they seem to be like a stable thing like
- 22:03they exist like in total are less than
- 22:06200 currencies in the world the royalty
- 22:08when we started in 2015
- 22:11we had few events where currencies were
- 22:14changing to would be a denomination
- 22:16event when the government decided you
- 22:18know this currency you know it's to blow
- 22:20that now we need to issue new currency
- 22:23that will replace it and we period of
- 22:25some there will be transaction coming in
- 22:27in both currencies those kinds this
- 22:30would get new isocodes etc and you can
- 22:33have to follow this adopt so you this
- 22:37transaction don't come and you like oh
- 22:39we cannot get exchange rates Buddhist
- 22:40currency because we don't know about it
- 22:42yet all right or some Connie cases like
- 22:45have you heard of that that I love men
- 22:49of Jersey against the Channel Islands
- 22:53they have their own pound currency it's
- 22:58generally we think it's it's it's a
- 23:00British pound but actually it's a
- 23:01different currency it's pegged to pounds
- 23:04it's always one-to-one it doesn't have
- 23:05its own exchange rate because of this
- 23:08market data providers Bloomberg etc they
- 23:10don't provide rates for those cars it's
- 23:12just they just tell them can you give me
- 23:14like I'm P is a love man pounds in give
- 23:17me right for it so even know I don't
- 23:19know what I'm P is but there is ISO code
- 23:22for this currency and transactions can
- 23:23come in in this currency so we end up
- 23:26having a lot of logic kind of this on
- 23:29this edges trying to you know put adopts
- 23:32all these two patrols as saying hey
- 23:35these pounds actual very same as British
- 23:37Pound right another thing that we've
- 23:46made mistake here things many startups
- 23:49they try to go fast and stuff we ended
- 23:52up has said it was monolith and we ended
- 23:55up in the beginning with this spaghetti
- 23:59architecture was called service
- 24:02spaghetti a lecture where you know this
- 24:06example here shows that it was a point
- 24:09when I said you know I don't want this
- 24:12automatic injection I need to run some
- 24:14something simple I I'm gonna just
- 24:17initialize it manually rights just
- 24:20explicitly and I started unrolling and
- 24:22rolling and rolling depending
- 24:24and I didn't get to the end of it I I it
- 24:26didn't work so because I hit a cyclic
- 24:30dependency because we use jook jook
- 24:34results depends this for you you don't
- 24:36even know you know it doesn't tell you
- 24:38that you have some better design code so
- 24:42this kind of thing made matters realize
- 24:47we shouldn't do this anymore
- 24:49we serve a spaghetti key texture like
- 24:53this is an example how you you like more
- 24:56explicitly you can get in this situation
- 24:58right you have dependence or something
- 25:00in change it's injected but then another
- 25:03thing also has dependency on it and it's
- 25:05like and you can get very complicated
- 25:06you don't even know so basically my
- 25:10advice will be especially a new world of
- 25:12micro services when we say we're gonna
- 25:15fill this very focused on some piece of
- 25:18functionality small applications
- 25:20services just injection of the injection
- 25:23doesn't give you any benefits really
- 25:25like there's not much blood that you
- 25:28actually create by doing it manually so
- 25:30by not doing this you making sure that
- 25:32your code is actually was simply and you
- 25:34are able to then to CC when it becomes
- 25:36too complex so we then switch because of
- 25:44this spaghetti code we switched into
- 25:49even driven mana let's face okay all
- 25:53these services like to process the
- 25:55transaction it's not just explicitly
- 25:57moving money from one account to another
- 25:59it's sort of other things maybe we need
- 26:01to do some checks injects one service we
- 26:04need to do fraud detection you inject
- 26:06another service then at the end we want
- 26:07to check out maybe we need to trigger
- 26:09some promotion here or when this send
- 26:11the push message it's a lot of stuff
- 26:12going on when one transaction happens
- 26:15and kind of this becomes as on that
- 26:18picture very very complicated so for
- 26:20then we resolved it by billing only in
- 26:25house even during framework here's just
- 26:29a fragment of you know we started
- 26:32defining logic in just smaller pieces
- 26:36it's it's a secret like framework where
- 26:39this that commands and there are
- 26:41repositories to to fetch dates are kind
- 26:43of a certain separation and those more
- 26:47compact pieces of logic commands we call
- 26:50them actions they the whole frame of
- 26:53bills aren't again as I said DDG
- 26:56concepts everything ends up being every
- 27:00changes up issuing an event and then you
- 27:03can do on top of those events create
- 27:06things like this and whatever you want
- 27:09any side effect you want to do you don't
- 27:11have to inject anything anymore you just
- 27:13create it it works independently anyway
- 27:15and just because of principle is
- 27:17everything issues an event just not to
- 27:21confuse it's not
- 27:23sakura-san the sense of the see us model
- 27:26where there is even sourcing where
- 27:27everything starts with an event and of
- 27:30that we create our we'd not don't we
- 27:33didn't do that this because we didn't
- 27:34have it first of all from the very
- 27:36beginning we and we didn't want to
- 27:39switch because even thousand has a lot
- 27:42of own problems with latencies etc
- 27:45there's all of complexity we decided to
- 27:47have dual model in a way we consistently
- 27:50always write in even log and at the same
- 27:53time your new state so which allows us
- 27:58quickly the next decision on the state
- 27:59could be done without calculating it and
- 28:02events are used for have to have audit
- 28:06log of everything and have even driven
- 28:09architecture so initially was I said
- 28:12it's even driven monolith because all of
- 28:14this was still within the code base but
- 28:16the code was already segregated into
- 28:18these kind of smaller modules which
- 28:22allows us then to move into next phase
- 28:25of check or even druvan services I don't
- 28:30I don't like using micro service system
- 28:32because it's kind of it's the name
- 28:36itself is maybe a bit exaggerated
- 28:39because when we say micro before we had
- 28:42service oriented architecture and those
- 28:43were services now we have micro services
- 28:46was mean there
- 28:48million times smaller or in what senses
- 28:51when is this problem because of this not
- 28:55everyone agrees on what how big that
- 28:57micro service should be etc so if we
- 29:00just say our services should perform you
- 29:05know if they separate by domain
- 29:09boundaries and you know they linked
- 29:13through three events and so in that
- 29:17previous thing by the way on the
- 29:21previous slide was on the front that we
- 29:23used angular at the time react was not
- 29:26seen fashion yet and then in 2016
- 29:29everything was was written into react
- 29:33which is a good thing angular was first
- 29:37of all it was not done by people
- 29:39specializing that was done by Java
- 29:41developers it was a nice so now
- 29:45everything is on racks is a lot cleaner
- 29:47on the front end as well so and the
- 29:50whole thing this ops this done being
- 29:54more applications in fact I didn't show
- 29:57here the whole thing at that stage
- 29:59already was there was 2016 there was a
- 30:04lot more services but they too was small
- 30:07only see like bit of monolithic code one
- 30:10one code base and we introduced this
- 30:13even store where we started assisting
- 30:15all these events and which allowed us
- 30:16not to have this even driven model just
- 30:19within this monolith application but
- 30:21start moving this modules into just
- 30:24separate services separate code means
- 30:27because we started sending these events
- 30:29to even stove assisting them there and
- 30:31stream from there and then it would
- 30:33allow us to do things like this which is
- 30:36out of trying to explain what was going
- 30:39here so what one of the problems will
- 30:43have because we allow you to exchange
- 30:46currency instantly but reality is we
- 30:53become like a broker for you really is
- 30:55nothing happens instantly in real world
- 30:58like somewhere in the bank this there
- 31:00are accounts and then
- 31:02the money should actually move from on
- 31:03layer below it search and lie below the
- 31:05set model processes around this etc so
- 31:08what it means when we as a user you have
- 31:13a contract with us I mean we tell you we
- 31:15give you the service we exchange money
- 31:17quickly and start using it we cannot
- 31:21pull back like okay we it means we're
- 31:24accumulating risk the risk that we when
- 31:27you safe exchange hundred pounds to two
- 31:30euros we need to get this euros from
- 31:32some who you will gave it to you now
- 31:34but we don't have it at that moment
- 31:36potentially right because it's not like
- 31:39people have all in equal amount of
- 31:42pounds and euros if they are constantly
- 31:44exchanging between themselves it's not
- 31:46balanced in this way but there is this
- 31:49offsetting effects anyway which helps
- 31:51but so we this kind of even driven model
- 31:55allowed us to so initially how we did it
- 31:57all our risk calculations happening was
- 32:00just one big query on transactions table
- 32:04on our ledger and it would produce like
- 32:07this and the numbers these our how
- 32:08sending risks and our finance department
- 32:12would go and act innate initially it was
- 32:14not big volumes that's why it was okay
- 32:17and but I'm falling started growing that
- 32:19calculation that crews are being slower
- 32:21slow and hit a point we're doing some
- 32:24optimizations on a career level and
- 32:26doing caching as I said was all
- 32:28pointless
- 32:29it was timing out in we wanted to have
- 32:32instant reaction to this so even driven
- 32:36allowed us to have this thing the risk
- 32:40calculation started happening in a
- 32:42separate application which on every
- 32:44event every literally transaction every
- 32:47financial movement it would update it
- 32:49risk online pretty much would be with
- 32:53delay probably of up to 100 milliseconds
- 32:58and that allowed us them to build this
- 33:01whole hedging of our risk in automated
- 33:05manner as well so which you know of
- 33:10volumes I was bigger and our finance
- 33:13you don't have to go on and go and trade
- 33:17it on the market that's accumulated risk
- 33:23another big problem in finance when you
- 33:26starts moving money around especially
- 33:28with us when we move with around the
- 33:31world
- 33:31and we try to make it as simple as
- 33:33possible is the financial crime which is
- 33:39one of those things is money laundering
- 33:42so as any financial institution using
- 33:48responsible food taking care of this
- 33:50problem and the biggest issue that is
- 33:53it's not deterministic it's you cannot
- 33:57just say one day we've fully solved it's
- 34:00like we clearly can say this is money
- 34:03laundering
- 34:04this is geniune transaction like there's
- 34:07no ever a hundred percent guarantee on
- 34:10anything this problem ends up being
- 34:12probabilistic and this is where a lot of
- 34:15our data scientists they build much
- 34:18machine learning models Concilium etc
- 34:23because we gonna have very complex
- 34:26business model all of different users
- 34:28different currencies country says it's
- 34:30very complex and guys it's amazing jobs
- 34:35they're our levels so on this it's hard
- 34:40to measure what say on fraud size which
- 34:43is a similar problem where the different
- 34:47types of for when people process still
- 34:49people's card details and then try to
- 34:51make transactions on behalf etcetera so
- 34:54for us to say with introduction of
- 34:58machine learning models filiz we
- 35:01decreased the level of fraud from
- 35:08recalls so it went down probably about
- 35:1140 times like the level like we probably
- 35:16about eight times so below the standards
- 35:20industry standards so it's it's quite
- 35:26quite impressive I know if you--if
- 35:27and you ever had a notification from
- 35:29system called shellac so it's like our
- 35:32in system based on this ml Allegan that
- 35:37detects the card card fraud and as I
- 35:41said it's very public problem and it's
- 35:43two-sided problem so on one side we want
- 35:46to catch these bad guys on the other
- 35:47side we don't want to affect the gene in
- 35:50users right and it's it's very hard
- 35:52problem is kind of the teams working on
- 35:54this they constantly try to optimize to
- 35:58decrease this so-called false positive
- 36:01right so that's and it's not possible to
- 36:05decrease it to zero unfortunately but in
- 36:09addition to this there are just more
- 36:11items in process when someone gets into
- 36:13that situation a genie the user gets
- 36:15caught into this trap process how to get
- 36:18them out who it's you know quickly
- 36:23through certain things like you may be
- 36:26asked or you may be asked on the up to
- 36:28upload documents proving maybe your
- 36:31transactional session so that it avoids
- 36:34this kind of way you deal with
- 36:36traditional bank I happened to be in the
- 36:40situation quite a few times when you do
- 36:42an international transaction it just
- 36:45binds just by default blocks it and you
- 36:47sits in anyways and then you have to
- 36:49call them and then it takes days
- 36:51sometimes week which is resolved you
- 36:53without kind of even being able to do
- 36:57anything at the end you just go to the
- 36:58branch so it's very very complex you can
- 37:01get very complex so how we dealt this
- 37:05with this promise in the beginning for
- 37:07that monolithic actually there was just
- 37:10within transaction processing there were
- 37:12all these checks and they were not the
- 37:15work because of this they were limited
- 37:17and we couldn't do too much while we
- 37:20process transaction at that point to do
- 37:23much of smart calculations to figure out
- 37:25like okay based on the transaction
- 37:27history do we think this is authorized
- 37:30by you or not so this was not obviously
- 37:35scaling and we went into this machine
- 37:41learning this algorithms and that allows
- 37:45us to do something this this kind of
- 37:46architecture where our transaction
- 37:50authorization engine it would ask this
- 37:53code brains this most of that stuff is
- 37:57written in Python because that's what
- 37:59data science is usually the most yeah
- 38:03that's the best fit for that kind of
- 38:05problem
- 38:07gets an answer but an answer here will
- 38:09be really prepared already this for
- 38:12detection system it will already know
- 38:16before the next transaction happens and
- 38:19in addition with this new information
- 38:21will be able to kind of to give an
- 38:23answer very quickly learn based on that
- 38:24there will be an event generated based
- 38:28on you know you were successful
- 38:29transaction or was a decline due to
- 38:31suspicion and fraud would go through our
- 38:34even stall which would stream back into
- 38:36the system it will updates everything
- 38:38and then this how it knows them for the
- 38:40next transaction already to give you a
- 38:42quick answer because in some cases is
- 38:46very critical
- 38:46where on card transactions we don't have
- 38:50that much time to do a lot of smart
- 38:52things and that's why we have come to
- 38:53have this model pre calculating all of
- 38:55things because we would be limited with
- 38:57like 500 milliseconds to do all of it
- 39:08slowly I'm gonna touch quickly on the
- 39:14process itself on the culture how we do
- 39:16these rights it's we known as a company
- 39:21of growing fast building order features
- 39:24fast etc how does it how does it work
- 39:27how do we do it without breaking stuff
- 39:30so the basic principles people who do
- 39:36this stuff they they're responsible
- 39:39there is no pipeline how it would be
- 39:41typical in big organizations and begin
- 39:44the price the business only is preparing
- 39:48requirements and developers coding that
- 39:51and
- 39:51the testers testing and then the release
- 39:55manager etc some organizations can be
- 39:57very complex and they may call it agile
- 40:00as well
- 40:00what father Jaya was something something
- 40:03else growing like from just few people
- 40:06developers become these kind of multi
- 40:10faceted all rights you use code just as
- 40:13a tool you your programming skills to
- 40:15solve problems so engineers because
- 40:19we're on the cloud nose while dealing
- 40:21with the fractious actually is more
- 40:23about coding you then you know actually
- 40:27as in the past dealing with physical
- 40:28Hardware etcetera the all the complexity
- 40:31of the hardware is hidden from you just
- 40:33work with these abstract notions you
- 40:35know VPC sub networks etc which are in
- 40:39anyone who studied computer science
- 40:43should understand at least on the high
- 40:45level this wife in in our case we have
- 40:48specialized DevOps guys who do very
- 40:52specialized projects and they would do a
- 40:54lot of heavyweight stuff maybe doing
- 40:59some working on scalability of this
- 41:01infrastructure on on skill build of
- 41:05databases on on network layer physical
- 41:10connectivity will have some physical
- 41:12connectivity to to payment networks in
- 41:15physical data centers around security
- 41:19etc and huge thing which which is like
- 41:26in 2017 when we started growing fast and
- 41:30a team of ten people quickly turned into
- 41:33a team of 50 developers people coming
- 41:37from different places from different
- 41:39understanding of HL processes was
- 41:44interesting as well to hear about one of
- 41:46the common answers to would is what it a
- 41:50gel is for you what do you mean by agile
- 41:51process from a genius to here oh it's
- 41:54scrum which is you know we don't see
- 41:58scrum is a gel and if it is because it's
- 42:02kind of rigid process in a way and
- 42:05from my experience evolved in many
- 42:07organizations in the past teams struggle
- 42:10to adopt scrum which shouldn't be
- 42:13initialized so how agile is about people
- 42:15and processes right process should be
- 42:17helping not saying in a way so we're
- 42:20kind of not focused on scram or scrum
- 42:22just do things that work and one thing
- 42:27that definitely works and that face when
- 42:30we started growing fast and developers
- 42:34DG was set as like a engineering
- 42:39strategy like TDD is for everyone who
- 42:43does coding everyone has to do TDD like
- 42:47not everyone does it on the same level
- 42:48of I'll be honest new people as well and
- 42:52realized in some organizations TDD
- 42:56understanding of TDD is just having
- 42:58tests which is surprising to me at the
- 43:01time what was made it very clear DD
- 43:06means you have to test first if you talk
- 43:08about quality you have to put quality
- 43:09first and so you have to write your
- 43:11tests first and then focus on the
- 43:13problem describe it and then you go into
- 43:14implementing it like very important
- 43:17concept this is why because of this vs.
- 43:21we didn't have historically test this we
- 43:22had mobile justice would test UI in the
- 43:26beginning and that didn't work well
- 43:29because the absolute time as well the
- 43:34weight of box was a lot higher because
- 43:37engineers didn't have culture of
- 43:39test-first development always kind of
- 43:43lay off loaded this responsibility of
- 43:46quality to to testers right
- 43:48which wasn't scaling well so we decided
- 43:52to change this and this is like we
- 43:56stopped hiring here.i testers it's
- 43:58completely and those who left those
- 44:01people they focused on creating
- 44:04frameworks and infrastructure so no one
- 44:08would often is called a software
- 44:10engineer in test so they would do
- 44:12automation help developers to focus on
- 44:15solving the determine problems
- 44:19them tools to write tests efficiently
- 44:22and run them and since since then
- 44:26so the like we started tracking the red
- 44:30of box crashes in the ABS in both areas
- 44:33Android it's that it's give motivation
- 44:36to develop it's actually to protect
- 44:38themselves from these problems because
- 44:41they come back to them at the end of the
- 44:43day so they started focusing on testing
- 44:46a lot and builds all the friends for
- 44:48this and as kinda mentioned a few times
- 44:55through the talk we one of the how
- 45:01shallow things is we're very problem
- 45:03driven not solution driven what it means
- 45:06is solution becomes secondary for us
- 45:10when we like the arguments what we do
- 45:13this way this way to use this technology
- 45:16or that when you start putting this
- 45:20around the problem definition when you
- 45:22define problem well but everyone who
- 45:25works on it understands it the same way
- 45:26then this becomes a criteria does it
- 45:29something work there or not and are the
- 45:32differences that outside of this process
- 45:34kind of become we're less important than
- 45:37and like the this Hollywood's generally
- 45:39don't don't happen in company between
- 45:41engineers and of course another very
- 45:48important aspect is peer reviews it's a
- 45:52way to challenge each other and learn
- 45:53from each other so it's General General
- 45:56Lee looks like everyone is a way of code
- 46:02review process with full requests etc
- 46:06we kind of would do this as part of this
- 46:10peer review but focus again on the
- 46:12problem not on the code what it means is
- 46:15in this process engineers are actually
- 46:18they have a slide where we coded is a
- 46:20specification just again to focus you
- 46:24have this focus on ddd describing first
- 46:27the problem with test where it starts
- 46:30from understanding the problem
- 46:32thinking about it designing some
- 46:34solution discussing it with your
- 46:35reviewers so that's where they Sam you
- 46:38prepare some code a pull request they
- 46:41wouldn't know what it is about and they
- 46:44spend a lot less time you know they ask
- 46:46you question they expect to see
- 46:47something in the code by the time and
- 46:49they focus on this thing if you solve
- 46:51the problem first not on you know second
- 46:54syntactical things that are resolved by
- 46:57introducing conventions and it's like
- 47:00not the main focus and I'm gonna speak
- 47:09because not much time this and yeah and
- 47:14really obviously all of those things
- 47:17they're part of in provinces but without
- 47:19people involved in this not having drive
- 47:22to create the great experience for fully
- 47:24customers to be involved and you know
- 47:28understanding the impact engineers crazy
- 47:31this all of that wouldn't matter really
- 47:33so this is probably the main thing in
- 47:37the whole yeah and as a pin is a
- 47:41conclusion to conclude so you a problem
- 47:45driven you learn and apply new learnings
- 47:48fast you work as a team you can build
- 47:50anything not not just buying as
- 47:53engineers as a nation we we have these
- 47:55benefits of knowing the tools
- 47:58understanding abstraction we can apply
- 48:01these skills pretty much to any domain
- 48:03which is possessing in awesome position
- 48:06really compared to to some other people
- 48:10so what yeah don't don't just try to do
- 48:13all your ideas at once just for be
- 48:15focused that's what I was saying any
- 48:23questions
- 48:33I'm sorry so we're talking about a
- 48:48giving example of cap transaction
- 48:50authorization what means this signal
- 48:53when you say you touch the controllers
- 48:58payment attach terminal movie cards from
- 49:01their signal go through multiple parties
- 49:04we will go through some payment gateways
- 49:06acquiring banks it will go through
- 49:08central network or senator service of
- 49:11MasterCard or Visa then we'll go to
- 49:13process it to us and this is what I mean
- 49:16I bet point when we receive this message
- 49:18we have this 500 milliseconds to say
- 49:22okay this we can authorize it
- 49:24yes so the inside the direct end-to-end
- 49:29yes it takes longer the before cut
- 49:31transactions there is certain limit most
- 49:33economies they have some differences
- 49:35depending on the market as well
- 49:37depending how all the system is in
- 49:39different countries but as far as
- 49:42remember it's about five five seconds or
- 49:465 seconds and like this and end to end
- 49:48yeah sure yeah so the question is how we
- 49:56handled technical debt over time so
- 50:00technical debt is something we don't
- 50:03define it as a separate thing so focus
- 50:08on things like refactoring and since we
- 50:11moved to this architecture of you know
- 50:16even architecture with secure s with
- 50:19small components this becomes more
- 50:22problem driven like you make the
- 50:25technical debt becomes at certain points
- 50:27is just a new requirement we say okay
- 50:31now we which in certain level of
- 50:34customers we need to think how to scale
- 50:36for the next year like well can we scale
- 50:39with the current solution can we process
- 50:41the transactions what do we do just
- 50:43scale out by you
- 50:46you know allocating more resources
- 50:48processing resources always should we
- 50:50change something in the code and we make
- 50:51this decision we don't look at it as a
- 50:53technical debt technical debt was at the
- 50:56point when we transition to that those
- 50:58literally arising all the code and that
- 51:01happened and we have technical that
- 51:04probably define it so yeah it's just not
- 51:07give me absolute answer there is
- 51:09technical debt in mobile apps so in on
- 51:14Android app that has been closed
- 51:16everything was written from Java 6 to
- 51:19Kotlin which made all Android developers
- 51:23lives a lot easier
- 51:24and then on is it still these mix of
- 51:28Objective C and Swift so there's a bit
- 51:30of technical debt and rewriting of
- 51:34internal frameworks thank you
- 51:42[Applause]
- 51:46[Music]
About this transcript
This page contains the full transcript of Anyone can build a bank: creating a new banking backend by Vlad Yatsenko by Devoxx, generated from the public captions YouTube serves with the video. The transcript has 7,047 words across 1,019 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.