WEBVTT
Kind: captions
Language: en

00:00:18.119 --> 00:00:21.480 align:start position:0%
 
one<00:00:19.119><c> line</c><00:00:19.420><c> of</c><00:00:19.630><c> code</c><00:00:19.860><c> spurred</c><00:00:20.860><c> a</c><00:00:21.039><c> series</c><00:00:21.460><c> of</c>

00:00:21.480 --> 00:00:21.490 align:start position:0%
one line of code spurred a series of
 

00:00:21.490 --> 00:00:28.519 align:start position:0%
one line of code spurred a series of
momentous<00:00:22.300><c> events</c><00:00:22.810><c> in</c><00:00:23.020><c> blockchain</c><00:00:23.890><c> history</c>

00:00:28.519 --> 00:00:28.529 align:start position:0%
 
 

00:00:28.529 --> 00:00:33.720 align:start position:0%
 
the<00:00:29.529><c> line</c><00:00:29.710><c> of</c><00:00:29.919><c> code</c><00:00:30.189><c> in</c><00:00:30.900><c> red</c><00:00:32.010><c> it</c><00:00:33.010><c> was</c><00:00:33.280><c> moved</c><00:00:33.519><c> up</c>

00:00:33.720 --> 00:00:33.730 align:start position:0%
the line of code in red it was moved up
 

00:00:33.730 --> 00:00:37.170 align:start position:0%
the line of code in red it was moved up
to<00:00:34.480><c> where</c><00:00:34.660><c> the</c><00:00:34.840><c> green</c><00:00:35.019><c> line</c><00:00:35.230><c> is</c><00:00:35.470><c> and</c><00:00:36.030><c> that</c><00:00:37.030><c> was</c>

00:00:37.170 --> 00:00:37.180 align:start position:0%
to where the green line is and that was
 

00:00:37.180 --> 00:00:40.290 align:start position:0%
to where the green line is and that was
done<00:00:37.420><c> to</c><00:00:37.989><c> neutralize</c><00:00:38.860><c> a</c><00:00:39.250><c> re-entrant</c><00:00:40.030><c> see</c>

00:00:40.290 --> 00:00:40.300 align:start position:0%
done to neutralize a re-entrant see
 

00:00:40.300 --> 00:00:44.040 align:start position:0%
done to neutralize a re-entrant see
exploit<00:00:40.949><c> in</c><00:00:41.949><c> the</c><00:00:42.460><c> following</c><00:00:42.970><c> line</c><00:00:43.210><c> reward</c>

00:00:44.040 --> 00:00:44.050 align:start position:0%
exploit in the following line reward
 

00:00:44.050 --> 00:00:47.670 align:start position:0%
exploit in the following line reward
account<00:00:44.379><c> dot</c><00:00:44.680><c> payout</c><00:00:45.720><c> which</c><00:00:46.720><c> when</c><00:00:47.199><c> performed</c>

00:00:47.670 --> 00:00:47.680 align:start position:0%
account dot payout which when performed
 

00:00:47.680 --> 00:00:56.850 align:start position:0%
account dot payout which when performed
on<00:00:47.799><c> an</c><00:00:47.920><c> attackers</c><00:00:50.010><c> account</c><00:00:52.290><c> would</c><00:00:54.420><c> would</c><00:00:55.860><c> lead</c>

00:00:56.850 --> 00:00:56.860 align:start position:0%
on an attackers account would would lead
 

00:00:56.860 --> 00:01:00.570 align:start position:0%
on an attackers account would would lead
to<00:00:56.890><c> what</c><00:00:57.250><c> happened</c><00:00:57.610><c> to</c><00:00:57.879><c> the</c><00:00:58.330><c> DAO</c><00:00:59.580><c> the</c>

00:01:00.570 --> 00:01:00.580 align:start position:0%
to what happened to the DAO the
 

00:01:00.580 --> 00:01:03.359 align:start position:0%
to what happened to the DAO the
description<00:01:01.030><c> for</c><00:01:01.180><c> this</c><00:01:01.299><c> talk</c><00:01:02.040><c> was</c><00:01:03.040><c> before</c>

00:01:03.359 --> 00:01:03.369 align:start position:0%
description for this talk was before
 

00:01:03.369 --> 00:01:06.420 align:start position:0%
description for this talk was before
these<00:01:03.519><c> momentous</c><00:01:03.850><c> events</c><00:01:04.600><c> and</c><00:01:05.040><c> there's</c><00:01:06.040><c> too</c>

00:01:06.420 --> 00:01:06.430 align:start position:0%
these momentous events and there's too
 

00:01:06.430 --> 00:01:09.600 align:start position:0%
these momentous events and there's too
much<00:01:06.610><c> security</c><00:01:07.330><c> advice</c><00:01:07.960><c> to</c><00:01:08.890><c> share</c><00:01:09.130><c> not</c><00:01:09.430><c> enough</c>

00:01:09.600 --> 00:01:09.610 align:start position:0%
much security advice to share not enough
 

00:01:09.610 --> 00:01:12.000 align:start position:0%
much security advice to share not enough
time<00:01:09.880><c> that</c><00:01:10.630><c> the</c><00:01:10.780><c> BTC</c><00:01:11.260><c> relay</c><00:01:11.500><c> portion</c><00:01:11.830><c> of</c><00:01:11.920><c> this</c>

00:01:12.000 --> 00:01:12.010 align:start position:0%
time that the BTC relay portion of this
 

00:01:12.010 --> 00:01:16.830 align:start position:0%
time that the BTC relay portion of this
talk<00:01:12.250><c> is</c><00:01:12.280><c> omitted</c><00:01:13.560><c> here's</c><00:01:14.560><c> a</c><00:01:14.680><c> bonus</c><00:01:15.130><c> tip</c><00:01:15.840><c> label</c>

00:01:16.830 --> 00:01:16.840 align:start position:0%
talk is omitted here's a bonus tip label
 

00:01:16.840 --> 00:01:21.349 align:start position:0%
talk is omitted here's a bonus tip label
your<00:01:17.580><c> untrusted</c><00:01:18.580><c> contracts</c><00:01:19.469><c> so</c><00:01:20.469><c> in</c><00:01:20.710><c> the</c>

00:01:21.349 --> 00:01:21.359 align:start position:0%
your untrusted contracts so in the
 

00:01:21.359 --> 00:01:25.069 align:start position:0%
your untrusted contracts so in the
reward<00:01:22.359><c> account</c><00:01:22.659><c> dot</c><00:01:22.869><c> payout</c><00:01:23.549><c> account</c><00:01:24.549><c> line</c>

00:01:25.069 --> 00:01:25.079 align:start position:0%
reward account dot payout account line
 

00:01:25.079 --> 00:01:27.060 align:start position:0%
reward account dot payout account line
already<00:01:26.079><c> you</c><00:01:26.259><c> can</c><00:01:26.409><c> see</c><00:01:26.560><c> that</c><00:01:26.710><c> there</c><00:01:26.829><c> are</c><00:01:26.890><c> two</c>

00:01:27.060 --> 00:01:27.070 align:start position:0%
already you can see that there are two
 

00:01:27.070 --> 00:01:29.819 align:start position:0%
already you can see that there are two
accounts<00:01:27.520><c> here</c><00:01:27.789><c> and</c><00:01:28.210><c> it's</c><00:01:29.109><c> not</c><00:01:29.350><c> as</c><00:01:29.500><c> clear</c>

00:01:29.819 --> 00:01:29.829 align:start position:0%
accounts here and it's not as clear
 

00:01:29.829 --> 00:01:32.599 align:start position:0%
accounts here and it's not as clear
maybe<00:01:30.340><c> immediately</c><00:01:31.119><c> which</c><00:01:31.929><c> account</c><00:01:32.320><c> is</c>

00:01:32.599 --> 00:01:32.609 align:start position:0%
maybe immediately which account is
 

00:01:32.609 --> 00:01:36.630 align:start position:0%
maybe immediately which account is
untrusted<00:01:33.899><c> so</c><00:01:34.899><c> a</c><00:01:34.929><c> better</c><00:01:35.320><c> way</c><00:01:35.859><c> to</c><00:01:36.340><c> even</c>

00:01:36.630 --> 00:01:36.640 align:start position:0%
untrusted so a better way to even
 

00:01:36.640 --> 00:01:40.139 align:start position:0%
untrusted so a better way to even
rewrite<00:01:36.880><c> this</c><00:01:37.409><c> maybe</c><00:01:38.409><c> is</c><00:01:38.799><c> to</c><00:01:39.189><c> reward</c><00:01:39.700><c> account</c>

00:01:40.139 --> 00:01:40.149 align:start position:0%
rewrite this maybe is to reward account
 

00:01:40.149 --> 00:01:44.399 align:start position:0%
rewrite this maybe is to reward account
but<00:01:40.509><c> payout</c><00:01:41.490><c> untrusted</c><00:01:42.490><c> account</c><00:01:42.820><c> and</c><00:01:43.409><c> then</c>

00:01:44.399 --> 00:01:44.409 align:start position:0%
but payout untrusted account and then
 

00:01:44.409 --> 00:01:48.029 align:start position:0%
but payout untrusted account and then
when<00:01:44.590><c> people</c><00:01:44.979><c> see</c><00:01:45.189><c> that</c><00:01:45.369><c> it</c><00:01:46.359><c> can</c><00:01:46.659><c> help</c><00:01:47.350><c> help</c>

00:01:48.029 --> 00:01:48.039 align:start position:0%
when people see that it can help help
 

00:01:48.039 --> 00:01:49.980 align:start position:0%
when people see that it can help help
you<00:01:48.219><c> be</c><00:01:48.729><c> more</c><00:01:48.759><c> aware</c><00:01:49.179><c> of</c><00:01:49.210><c> what</c><00:01:49.569><c> might</c><00:01:49.749><c> happen</c>

00:01:49.980 --> 00:01:49.990 align:start position:0%
you be more aware of what might happen
 

00:01:49.990 --> 00:01:55.800 align:start position:0%
you be more aware of what might happen
and<00:01:51.119><c> as</c><00:01:52.119><c> an</c><00:01:52.299><c> additional</c><00:01:52.869><c> tip</c><00:01:54.210><c> message</c><00:01:55.210><c> sender</c>

00:01:55.800 --> 00:01:55.810 align:start position:0%
and as an additional tip message sender
 

00:01:55.810 --> 00:02:01.859 align:start position:0%
and as an additional tip message sender
can<00:01:56.710><c> also</c><00:01:56.890><c> be</c><00:01:57.719><c> untrusted</c><00:01:58.920><c> so</c><00:02:00.329><c> if</c><00:02:01.329><c> it's</c><00:02:01.600><c> always</c>

00:02:01.859 --> 00:02:01.869 align:start position:0%
can also be untrusted so if it's always
 

00:02:01.869 --> 00:02:04.379 align:start position:0%
can also be untrusted so if it's always
untrusted<00:02:02.380><c> then</c><00:02:02.560><c> you</c><00:02:03.310><c> you</c><00:02:03.520><c> definitely</c><00:02:03.999><c> need</c>

00:02:04.379 --> 00:02:04.389 align:start position:0%
untrusted then you you definitely need
 

00:02:04.389 --> 00:02:06.809 align:start position:0%
untrusted then you you definitely need
to<00:02:04.420><c> put</c><00:02:04.749><c> a</c><00:02:04.780><c> comment</c><00:02:04.990><c> in</c><00:02:05.170><c> your</c><00:02:05.229><c> code</c><00:02:05.530><c> that</c><00:02:05.859><c> just</c>

00:02:06.809 --> 00:02:06.819 align:start position:0%
to put a comment in your code that just
 

00:02:06.819 --> 00:02:13.699 align:start position:0%
to put a comment in your code that just
to<00:02:07.060><c> make</c><00:02:07.479><c> people</c><00:02:07.509><c> more</c><00:02:07.960><c> aware</c><00:02:12.120><c> the</c><00:02:13.120><c> MELD</c><00:02:13.330><c> allow</c>

00:02:13.699 --> 00:02:13.709 align:start position:0%
to make people more aware the MELD allow
 

00:02:13.709 --> 00:02:16.559 align:start position:0%
to make people more aware the MELD allow
simon<00:02:14.709><c> Delarue</c><00:02:15.160><c> be</c><00:02:15.340><c> a</c><00:02:15.370><c> and</c><00:02:15.730><c> I</c><00:02:16.000><c> start</c><00:02:16.450><c> the</c>

00:02:16.559 --> 00:02:16.569 align:start position:0%
simon Delarue be a and I start the
 

00:02:16.569 --> 00:02:19.290 align:start position:0%
simon Delarue be a and I start the
committee<00:02:16.840><c> resource</c><00:02:17.650><c> for</c><00:02:18.640><c> smart</c><00:02:18.910><c> contract</c>

00:02:19.290 --> 00:02:19.300 align:start position:0%
committee resource for smart contract
 

00:02:19.300 --> 00:02:22.199 align:start position:0%
committee resource for smart contract
security<00:02:19.780><c> tips</c><00:02:20.340><c> we</c><00:02:21.340><c> are</c><00:02:21.400><c> grateful</c><00:02:21.790><c> to</c><00:02:21.819><c> seven</c>

00:02:22.199 --> 00:02:22.209 align:start position:0%
security tips we are grateful to seven
 

00:02:22.209 --> 00:02:26.370 align:start position:0%
security tips we are grateful to seven
others<00:02:22.420><c> so</c><00:02:22.660><c> far</c><00:02:22.990><c> who</c><00:02:23.380><c> have</c><00:02:24.810><c> our</c><00:02:25.810><c> listeners</c>

00:02:26.370 --> 00:02:26.380 align:start position:0%
others so far who have our listeners
 

00:02:26.380 --> 00:02:28.050 align:start position:0%
others so far who have our listeners
contributors<00:02:26.920><c> in</c><00:02:27.100><c> github</c>

00:02:28.050 --> 00:02:28.060 align:start position:0%
contributors in github
 

00:02:28.060 --> 00:02:30.990 align:start position:0%
contributors in github
the<00:02:28.720><c> emphasis</c><00:02:28.840><c> is</c><00:02:29.200><c> on</c><00:02:29.470><c> community</c><00:02:30.000><c> because</c>

00:02:30.990 --> 00:02:31.000 align:start position:0%
the emphasis is on community because
 

00:02:31.000 --> 00:02:32.700 align:start position:0%
the emphasis is on community because
security<00:02:31.420><c> is</c><00:02:31.630><c> not</c><00:02:31.870><c> just</c><00:02:31.900><c> for</c><00:02:32.230><c> a</c><00:02:32.290><c> handful</c><00:02:32.650><c> of</c>

00:02:32.700 --> 00:02:32.710 align:start position:0%
security is not just for a handful of
 

00:02:32.710 --> 00:02:34.950 align:start position:0%
security is not just for a handful of
developers<00:02:33.280><c> to</c><00:02:33.490><c> write</c><00:02:33.580><c> about</c><00:02:33.880><c> and</c><00:02:34.210><c> the</c>

00:02:34.950 --> 00:02:34.960 align:start position:0%
developers to write about and the
 

00:02:34.960 --> 00:02:37.500 align:start position:0%
developers to write about and the
content<00:02:35.350><c> needs</c><00:02:35.440><c> to</c><00:02:35.590><c> be</c><00:02:35.710><c> aggregated</c><00:02:36.040><c> and</c><00:02:36.640><c> easy</c>

00:02:37.500 --> 00:02:37.510 align:start position:0%
content needs to be aggregated and easy
 

00:02:37.510 --> 00:02:40.140 align:start position:0%
content needs to be aggregated and easy
for<00:02:37.720><c> people</c><00:02:37.750><c> to</c><00:02:38.020><c> find</c><00:02:38.820><c> instead</c><00:02:39.820><c> of</c><00:02:39.940><c> being</c>

00:02:40.140 --> 00:02:40.150 align:start position:0%
for people to find instead of being
 

00:02:40.150 --> 00:02:45.180 align:start position:0%
for people to find instead of being
fragmented<00:02:40.570><c> and</c><00:02:40.990><c> scattered</c><00:02:43.740><c> we</c><00:02:44.740><c> start</c><00:02:45.040><c> with</c>

00:02:45.180 --> 00:02:45.190 align:start position:0%
fragmented and scattered we start with
 

00:02:45.190 --> 00:02:47.210 align:start position:0%
fragmented and scattered we start with
some<00:02:45.459><c> points</c><00:02:45.940><c> about</c><00:02:46.330><c> general</c><00:02:46.720><c> philosophy</c>

00:02:47.210 --> 00:02:47.220 align:start position:0%
some points about general philosophy
 

00:02:47.220 --> 00:02:49.680 align:start position:0%
some points about general philosophy
before<00:02:48.220><c> extending</c><00:02:48.580><c> much</c><00:02:49.000><c> further</c><00:02:49.330><c> and</c>

00:02:49.680 --> 00:02:49.690 align:start position:0%
before extending much further and
 

00:02:49.690 --> 00:02:53.490 align:start position:0%
before extending much further and
getting<00:02:50.650><c> more</c><00:02:50.890><c> technical</c><00:02:51.930><c> the</c><00:02:52.930><c> first</c><00:02:53.170><c> point</c>

00:02:53.490 --> 00:02:53.500 align:start position:0%
getting more technical the first point
 

00:02:53.500 --> 00:02:57.960 align:start position:0%
getting more technical the first point
is<00:02:53.650><c> to</c><00:02:53.770><c> prepare</c><00:02:54.070><c> for</c><00:02:54.280><c> failure</c><00:02:55.980><c> the</c><00:02:56.980><c> firt</c><00:02:57.370><c> this</c>

00:02:57.960 --> 00:02:57.970 align:start position:0%
is to prepare for failure the firt this
 

00:02:57.970 --> 00:03:02.010 align:start position:0%
is to prepare for failure the firt this
is<00:02:58.360><c> not</c><00:02:58.720><c> about</c><00:02:58.840><c> defeat</c><00:02:59.380><c> or</c><00:02:59.830><c> giving</c><00:03:00.580><c> up</c><00:03:00.840><c> this</c><00:03:01.840><c> is</c>

00:03:02.010 --> 00:03:02.020 align:start position:0%
is not about defeat or giving up this is
 

00:03:02.020 --> 00:03:04.560 align:start position:0%
is not about defeat or giving up this is
to<00:03:02.170><c> try</c><00:03:02.380><c> to</c><00:03:02.410><c> be</c><00:03:02.709><c> ready</c><00:03:02.950><c> for</c><00:03:03.310><c> the</c><00:03:04.150><c> unknown</c>

00:03:04.560 --> 00:03:04.570 align:start position:0%
to try to be ready for the unknown
 

00:03:04.570 --> 00:03:08.370 align:start position:0%
to try to be ready for the unknown
unknowns<00:03:06.239><c> this</c><00:03:07.239><c> can</c><00:03:07.450><c> be</c><00:03:07.570><c> very</c><00:03:07.780><c> difficult</c><00:03:07.959><c> to</c>

00:03:08.370 --> 00:03:08.380 align:start position:0%
unknowns this can be very difficult to
 

00:03:08.380 --> 00:03:11.540 align:start position:0%
unknowns this can be very difficult to
do<00:03:08.730><c> but</c><00:03:09.730><c> it</c><00:03:09.880><c> is</c><00:03:10.000><c> possible</c><00:03:10.209><c> in</c><00:03:10.570><c> some</c><00:03:10.780><c> cases</c><00:03:11.020><c> and</c>

00:03:11.540 --> 00:03:11.550 align:start position:0%
do but it is possible in some cases and
 

00:03:11.550 --> 00:03:16.080 align:start position:0%
do but it is possible in some cases and
the<00:03:12.550><c> next</c><00:03:12.790><c> slide</c><00:03:12.880><c> is</c><00:03:13.150><c> an</c><00:03:13.270><c> example</c><00:03:13.570><c> of</c><00:03:13.750><c> this</c><00:03:15.090><c> the</c>

00:03:16.080 --> 00:03:16.090 align:start position:0%
the next slide is an example of this the
 

00:03:16.090 --> 00:03:18.930 align:start position:0%
the next slide is an example of this the
second<00:03:16.450><c> example</c><00:03:16.870><c> the</c><00:03:17.260><c> second</c><00:03:18.070><c> point</c><00:03:18.220><c> is</c><00:03:18.820><c> to</c>

00:03:18.930 --> 00:03:18.940 align:start position:0%
second example the second point is to
 

00:03:18.940 --> 00:03:22.500 align:start position:0%
second example the second point is to
roll<00:03:19.360><c> out</c><00:03:19.600><c> carefully</c><00:03:21.300><c> production</c><00:03:22.300><c> a</c>

00:03:22.500 --> 00:03:22.510 align:start position:0%
roll out carefully production a
 

00:03:22.510 --> 00:03:25.290 align:start position:0%
roll out carefully production a
production<00:03:23.440><c> system</c><00:03:23.620><c> needs</c><00:03:24.430><c> baking</c><00:03:24.910><c> time</c><00:03:25.150><c> in</c>

00:03:25.290 --> 00:03:25.300 align:start position:0%
production system needs baking time in
 

00:03:25.300 --> 00:03:29.970 align:start position:0%
production system needs baking time in
production<00:03:27.810><c> the</c><00:03:28.810><c> strongest</c><00:03:29.230><c> swords</c><00:03:29.739><c> are</c>

00:03:29.970 --> 00:03:29.980 align:start position:0%
production the strongest swords are
 

00:03:29.980 --> 00:03:33.990 align:start position:0%
production the strongest swords are
forged<00:03:30.370><c> by</c><00:03:30.850><c> repeatedly</c><00:03:32.040><c> processing</c><00:03:33.040><c> them</c><00:03:33.250><c> in</c>

00:03:33.990 --> 00:03:34.000 align:start position:0%
forged by repeatedly processing them in
 

00:03:34.000 --> 00:03:36.410 align:start position:0%
forged by repeatedly processing them in
a<00:03:34.120><c> process</c><00:03:34.900><c> of</c><00:03:35.080><c> putting</c><00:03:35.290><c> them</c><00:03:35.530><c> in</c><00:03:35.650><c> fire</c><00:03:35.920><c> and</c>

00:03:36.410 --> 00:03:36.420 align:start position:0%
a process of putting them in fire and
 

00:03:36.420 --> 00:03:40.710 align:start position:0%
a process of putting them in fire and
hammering<00:03:37.420><c> them</c><00:03:37.720><c> it</c><00:03:38.500><c> takes</c><00:03:38.739><c> time</c><00:03:39.510><c> so</c><00:03:40.510><c> for</c>

00:03:40.710 --> 00:03:40.720 align:start position:0%
hammering them it takes time so for
 

00:03:40.720 --> 00:03:42.360 align:start position:0%
hammering them it takes time so for
contracts<00:03:41.350><c> they</c><00:03:41.830><c> should</c><00:03:42.040><c> be</c><00:03:42.130><c> put</c><00:03:42.340><c> through</c>

00:03:42.360 --> 00:03:42.370 align:start position:0%
contracts they should be put through
 

00:03:42.370 --> 00:03:45.000 align:start position:0%
contracts they should be put through
test<00:03:42.850><c> nets</c><00:03:43.120><c> and</c><00:03:43.420><c> then</c><00:03:44.140><c> a</c><00:03:44.260><c> beta</c><00:03:44.470><c> on</c><00:03:44.560><c> maenette</c>

00:03:45.000 --> 00:03:45.010 align:start position:0%
test nets and then a beta on maenette
 

00:03:45.010 --> 00:03:48.259 align:start position:0%
test nets and then a beta on maenette
before<00:03:45.880><c> a</c><00:03:45.910><c> production</c><00:03:46.390><c> launch</c><00:03:46.600><c> on</c><00:03:46.989><c> main</c><00:03:47.290><c> net</c>

00:03:48.259 --> 00:03:48.269 align:start position:0%
before a production launch on main net
 

00:03:48.269 --> 00:03:50.699 align:start position:0%
before a production launch on main net
keeping<00:03:49.269><c> contracts</c><00:03:49.810><c> simple</c><00:03:50.140><c> is</c><00:03:50.260><c> an</c><00:03:50.380><c> obvious</c>

00:03:50.699 --> 00:03:50.709 align:start position:0%
keeping contracts simple is an obvious
 

00:03:50.709 --> 00:03:53.460 align:start position:0%
keeping contracts simple is an obvious
tip<00:03:51.330><c> but</c><00:03:52.330><c> the</c><00:03:52.360><c> process</c><00:03:52.840><c> of</c><00:03:52.930><c> simplification</c>

00:03:53.460 --> 00:03:53.470 align:start position:0%
tip but the process of simplification
 

00:03:53.470 --> 00:03:57.630 align:start position:0%
tip but the process of simplification
can<00:03:54.160><c> lead</c><00:03:54.760><c> to</c><00:03:54.940><c> surprising</c><00:03:55.720><c> results</c><00:03:56.560><c> even</c><00:03:57.519><c> in</c>

00:03:57.630 --> 00:03:57.640 align:start position:0%
can lead to surprising results even in
 

00:03:57.640 --> 00:04:01.020 align:start position:0%
can lead to surprising results even in
the<00:03:57.760><c> system</c><00:03:58.150><c> that</c><00:03:58.299><c> already</c><00:03:58.600><c> looks</c><00:03:58.870><c> simple</c><00:04:00.030><c> to</c>

00:04:01.020 --> 00:04:01.030 align:start position:0%
the system that already looks simple to
 

00:04:01.030 --> 00:04:03.390 align:start position:0%
the system that already looks simple to
stay<00:04:01.269><c> up</c><00:04:01.420><c> to</c><00:04:01.600><c> date</c><00:04:01.890><c> there's</c><00:04:02.890><c> a</c><00:04:02.980><c> bibliography</c>

00:04:03.390 --> 00:04:03.400 align:start position:0%
stay up to date there's a bibliography
 

00:04:03.400 --> 00:04:06.150 align:start position:0%
stay up to date there's a bibliography
at<00:04:03.880><c> the</c><00:04:03.910><c> repo</c><00:04:04.329><c> for</c><00:04:05.290><c> the</c><00:04:05.410><c> community</c><00:04:05.769><c> resource</c>

00:04:06.150 --> 00:04:06.160 align:start position:0%
at the repo for the community resource
 

00:04:06.160 --> 00:04:07.890 align:start position:0%
at the repo for the community resource
that<00:04:06.400><c> everyone</c><00:04:06.790><c> is</c><00:04:06.910><c> welcome</c><00:04:07.269><c> to</c><00:04:07.480><c> contribute</c>

00:04:07.890 --> 00:04:07.900 align:start position:0%
that everyone is welcome to contribute
 

00:04:07.900 --> 00:04:11.430 align:start position:0%
that everyone is welcome to contribute
to<00:04:08.850><c> be</c><00:04:09.850><c> aware</c><00:04:10.030><c> of</c><00:04:10.090><c> blockchain</c><00:04:10.630><c> properties</c><00:04:11.079><c> is</c>

00:04:11.430 --> 00:04:11.440 align:start position:0%
to be aware of blockchain properties is
 

00:04:11.440 --> 00:04:16.009 align:start position:0%
to be aware of blockchain properties is
what<00:04:11.739><c> the</c><00:04:11.980><c> rest</c><00:04:12.549><c> of</c><00:04:12.910><c> this</c><00:04:13.150><c> talk</c><00:04:13.390><c> relates</c><00:04:13.780><c> to</c><00:04:14.430><c> as</c>

00:04:16.009 --> 00:04:16.019 align:start position:0%
what the rest of this talk relates to as
 

00:04:16.019 --> 00:04:18.390 align:start position:0%
what the rest of this talk relates to as
promised<00:04:17.019><c> here's</c><00:04:17.290><c> an</c><00:04:17.410><c> example</c><00:04:17.859><c> of</c><00:04:17.950><c> preparing</c>

00:04:18.390 --> 00:04:18.400 align:start position:0%
promised here's an example of preparing
 

00:04:18.400 --> 00:04:21.960 align:start position:0%
promised here's an example of preparing
for<00:04:18.579><c> failure</c><00:04:20.010><c> the</c><00:04:21.010><c> contract</c><00:04:21.459><c> keeps</c><00:04:21.669><c> track</c><00:04:21.940><c> of</c>

00:04:21.960 --> 00:04:21.970 align:start position:0%
for failure the contract keeps track of
 

00:04:21.970 --> 00:04:26.250 align:start position:0%
for failure the contract keeps track of
its<00:04:22.180><c> expected</c><00:04:22.630><c> fund</c><00:04:23.110><c> balance</c><00:04:25.260><c> check</c>

00:04:26.250 --> 00:04:26.260 align:start position:0%
its expected fund balance check
 

00:04:26.260 --> 00:04:28.560 align:start position:0%
its expected fund balance check
invariants<00:04:26.860><c> throws</c><00:04:27.190><c> if</c><00:04:27.820><c> the</c><00:04:27.940><c> actual</c><00:04:28.240><c> balance</c>

00:04:28.560 --> 00:04:28.570 align:start position:0%
invariants throws if the actual balance
 

00:04:28.570 --> 00:04:30.270 align:start position:0%
invariants throws if the actual balance
of<00:04:28.750><c> the</c><00:04:28.840><c> contract</c><00:04:29.350><c> is</c><00:04:29.530><c> smaller</c><00:04:29.860><c> than</c><00:04:30.130><c> the</c>

00:04:30.270 --> 00:04:30.280 align:start position:0%
of the contract is smaller than the
 

00:04:30.280 --> 00:04:33.990 align:start position:0%
of the contract is smaller than the
expected<00:04:30.790><c> balance</c><00:04:31.680><c> and</c>

00:04:33.990 --> 00:04:34.000 align:start position:0%
expected balance and
 

00:04:34.000 --> 00:04:35.760 align:start position:0%
expected balance and
this<00:04:34.090><c> check</c><00:04:34.390><c> invariance</c><00:04:34.870><c> is</c><00:04:35.140><c> called</c><00:04:35.470><c> at</c><00:04:35.650><c> the</c>

00:04:35.760 --> 00:04:35.770 align:start position:0%
this check invariance is called at the
 

00:04:35.770 --> 00:04:38.040 align:start position:0%
this check invariance is called at the
end<00:04:35.800><c> of</c><00:04:36.130><c> some</c><00:04:36.790><c> of</c><00:04:36.940><c> the</c><00:04:37.030><c> key</c><00:04:37.210><c> functions</c><00:04:37.570><c> in</c><00:04:37.960><c> the</c>

00:04:38.040 --> 00:04:38.050 align:start position:0%
end of some of the key functions in the
 

00:04:38.050 --> 00:04:42.870 align:start position:0%
end of some of the key functions in the
contract<00:04:39.390><c> now</c><00:04:40.390><c> the</c><00:04:40.450><c> emergency</c><00:04:40.780><c> call</c><00:04:41.880><c> sends</c>

00:04:42.870 --> 00:04:42.880 align:start position:0%
contract now the emergency call sends
 

00:04:42.880 --> 00:04:45.270 align:start position:0%
contract now the emergency call sends
the<00:04:42.970><c> balance</c><00:04:43.330><c> to</c><00:04:43.480><c> the</c><00:04:43.570><c> workshop</c><00:04:43.930><c> account</c><00:04:44.290><c> only</c>

00:04:45.270 --> 00:04:45.280 align:start position:0%
the balance to the workshop account only
 

00:04:45.280 --> 00:04:48.510 align:start position:0%
the balance to the workshop account only
if<00:04:45.640><c> the</c><00:04:45.760><c> invariant</c><00:04:46.240><c> is</c><00:04:46.360><c> broken</c><00:04:47.070><c> the</c><00:04:48.070><c> invariant</c>

00:04:48.510 --> 00:04:48.520 align:start position:0%
if the invariant is broken the invariant
 

00:04:48.520 --> 00:04:51.480 align:start position:0%
if the invariant is broken the invariant
should<00:04:48.790><c> not</c><00:04:48.940><c> get</c><00:04:49.150><c> broken</c><00:04:49.740><c> but</c><00:04:50.740><c> just</c><00:04:51.040><c> in</c><00:04:51.220><c> case</c>

00:04:51.480 --> 00:04:51.490 align:start position:0%
should not get broken but just in case
 

00:04:51.490 --> 00:04:55.380 align:start position:0%
should not get broken but just in case
it<00:04:51.730><c> does</c><00:04:52.350><c> the</c><00:04:53.350><c> emergency</c><00:04:53.860><c> call</c><00:04:54.100><c> will</c><00:04:54.580><c> send</c><00:04:54.910><c> the</c>

00:04:55.380 --> 00:04:55.390 align:start position:0%
it does the emergency call will send the
 

00:04:55.390 --> 00:04:59.190 align:start position:0%
it does the emergency call will send the
funds<00:04:55.600><c> away</c><00:04:57.300><c> anyone</c><00:04:58.300><c> can</c><00:04:58.720><c> invoke</c><00:04:58.990><c> the</c>

00:04:59.190 --> 00:04:59.200 align:start position:0%
funds away anyone can invoke the
 

00:04:59.200 --> 00:05:02.160 align:start position:0%
funds away anyone can invoke the
emergency<00:04:59.860><c> call</c><00:05:00.100><c> and</c><00:05:00.480><c> the</c><00:05:01.480><c> plan</c><00:05:01.690><c> is</c><00:05:01.840><c> to</c><00:05:01.870><c> have</c><00:05:02.110><c> a</c>

00:05:02.160 --> 00:05:02.170 align:start position:0%
emergency call and the plan is to have a
 

00:05:02.170 --> 00:05:06.720 align:start position:0%
emergency call and the plan is to have a
server<00:05:02.550><c> call</c><00:05:03.550><c> it</c><00:05:03.730><c> every</c><00:05:04.150><c> second</c><00:05:05.370><c> if</c><00:05:06.370><c> there</c><00:05:06.640><c> is</c>

00:05:06.720 --> 00:05:06.730 align:start position:0%
server call it every second if there is
 

00:05:06.730 --> 00:05:09.060 align:start position:0%
server call it every second if there is
a<00:05:06.760><c> breach</c><00:05:07.030><c> that</c><00:05:07.419><c> the</c><00:05:07.780><c> contracts</c><00:05:08.320><c> balance</c><00:05:08.710><c> is</c>

00:05:09.060 --> 00:05:09.070 align:start position:0%
a breach that the contracts balance is
 

00:05:09.070 --> 00:05:12.600 align:start position:0%
a breach that the contracts balance is
smaller<00:05:09.550><c> than</c><00:05:09.850><c> what</c><00:05:10.030><c> it</c><00:05:10.120><c> expects</c><00:05:10.840><c> the</c><00:05:11.310><c> hope</c><00:05:12.310><c> is</c>

00:05:12.600 --> 00:05:12.610 align:start position:0%
smaller than what it expects the hope is
 

00:05:12.610 --> 00:05:14.790 align:start position:0%
smaller than what it expects the hope is
that<00:05:12.850><c> most</c><00:05:13.090><c> of</c><00:05:13.300><c> the</c><00:05:13.419><c> funds</c><00:05:13.660><c> can</c><00:05:14.260><c> be</c><00:05:14.440><c> sent</c><00:05:14.680><c> to</c>

00:05:14.790 --> 00:05:14.800 align:start position:0%
that most of the funds can be sent to
 

00:05:14.800 --> 00:05:15.630 align:start position:0%
that most of the funds can be sent to
the<00:05:14.919><c> workshop</c>

00:05:15.630 --> 00:05:15.640 align:start position:0%
the workshop
 

00:05:15.640 --> 00:05:21.560 align:start position:0%
the workshop
instead<00:05:16.630><c> of</c><00:05:16.750><c> being</c><00:05:17.020><c> drained</c><00:05:17.290><c> to</c><00:05:17.620><c> an</c><00:05:17.710><c> attacker</c>

00:05:21.560 --> 00:05:21.570 align:start position:0%
 
 

00:05:21.570 --> 00:05:25.590 align:start position:0%
 
contracts<00:05:22.860><c> calling</c><00:05:23.860><c> each</c><00:05:23.980><c> other</c><00:05:24.190><c> is</c><00:05:24.940><c> powerful</c>

00:05:25.590 --> 00:05:25.600 align:start position:0%
contracts calling each other is powerful
 

00:05:25.600 --> 00:05:29.430 align:start position:0%
contracts calling each other is powerful
and<00:05:25.840><c> can</c><00:05:26.200><c> lead</c><00:05:26.440><c> to</c><00:05:26.470><c> emergent</c><00:05:27.280><c> use</c><00:05:27.430><c> cases</c><00:05:28.440><c> but</c>

00:05:29.430 --> 00:05:29.440 align:start position:0%
and can lead to emergent use cases but
 

00:05:29.440 --> 00:05:31.980 align:start position:0%
and can lead to emergent use cases but
care<00:05:29.710><c> must</c><00:05:29.740><c> be</c><00:05:30.130><c> taken</c><00:05:30.250><c> for</c><00:05:30.850><c> external</c><00:05:31.750><c> calls</c>

00:05:31.980 --> 00:05:31.990 align:start position:0%
care must be taken for external calls
 

00:05:31.990 --> 00:05:35.850 align:start position:0%
care must be taken for external calls
that<00:05:32.620><c> a</c><00:05:32.650><c> contract</c><00:05:33.100><c> makes</c><00:05:34.140><c> the</c><00:05:35.140><c> recommendation</c>

00:05:35.850 --> 00:05:35.860 align:start position:0%
that a contract makes the recommendation
 

00:05:35.860 --> 00:05:38.159 align:start position:0%
that a contract makes the recommendation
is<00:05:35.950><c> to</c><00:05:35.980><c> avoid</c><00:05:36.340><c> calls</c><00:05:36.700><c> to</c><00:05:36.940><c> untrusted</c><00:05:37.510><c> contracts</c>

00:05:38.159 --> 00:05:38.169 align:start position:0%
is to avoid calls to untrusted contracts
 

00:05:38.169 --> 00:05:42.060 align:start position:0%
is to avoid calls to untrusted contracts
as<00:05:38.710><c> much</c><00:05:38.950><c> as</c><00:05:39.160><c> you</c><00:05:39.250><c> can</c><00:05:40.530><c> untrusted</c><00:05:41.530><c> means</c><00:05:41.710><c> any</c>

00:05:42.060 --> 00:05:42.070 align:start position:0%
as much as you can untrusted means any
 

00:05:42.070 --> 00:05:45.390 align:start position:0%
as much as you can untrusted means any
contract<00:05:42.700><c> that</c><00:05:43.060><c> you</c><00:05:43.240><c> have</c><00:05:43.270><c> not</c><00:05:43.540><c> written</c><00:05:44.400><c> this</c>

00:05:45.390 --> 00:05:45.400 align:start position:0%
contract that you have not written this
 

00:05:45.400 --> 00:05:47.460 align:start position:0%
contract that you have not written this
is<00:05:45.610><c> because</c><00:05:45.910><c> if</c><00:05:46.060><c> you</c><00:05:46.150><c> call</c><00:05:46.330><c> someone</c><00:05:46.720><c> else's</c>

00:05:47.460 --> 00:05:47.470 align:start position:0%
is because if you call someone else's
 

00:05:47.470 --> 00:05:50.370 align:start position:0%
is because if you call someone else's
contract<00:05:48.090><c> they</c><00:05:49.090><c> or</c><00:05:49.419><c> one</c><00:05:50.080><c> of</c><00:05:50.200><c> their</c>

00:05:50.370 --> 00:05:50.380 align:start position:0%
contract they or one of their
 

00:05:50.380 --> 00:05:52.800 align:start position:0%
contract they or one of their
dependencies<00:05:51.130><c> could</c><00:05:52.030><c> accidentally</c><00:05:52.540><c> call</c><00:05:52.780><c> a</c>

00:05:52.800 --> 00:05:52.810 align:start position:0%
dependencies could accidentally call a
 

00:05:52.810 --> 00:05:55.920 align:start position:0%
dependencies could accidentally call a
malicious<00:05:53.350><c> contract</c><00:05:53.890><c> in</c><00:05:54.660><c> the</c><00:05:55.660><c> chain</c><00:05:55.900><c> of</c>

00:05:55.920 --> 00:05:55.930 align:start position:0%
malicious contract in the chain of
 

00:05:55.930 --> 00:05:59.550 align:start position:0%
malicious contract in the chain of
contract<00:05:56.530><c> calls</c><00:05:57.030><c> all</c><00:05:58.030><c> it</c><00:05:58.300><c> takes</c><00:05:58.540><c> is</c><00:05:58.930><c> for</c><00:05:59.500><c> one</c>

00:05:59.550 --> 00:05:59.560 align:start position:0%
contract calls all it takes is for one
 

00:05:59.560 --> 00:06:02.030 align:start position:0%
contract calls all it takes is for one
contract<00:06:00.250><c> to</c><00:06:00.820><c> make</c><00:06:01.000><c> a</c><00:06:01.030><c> mistake</c>

00:06:02.030 --> 00:06:02.040 align:start position:0%
contract to make a mistake
 

00:06:02.040 --> 00:06:06.120 align:start position:0%
contract to make a mistake
thus<00:06:03.450><c> assume</c><00:06:04.450><c> that</c><00:06:04.690><c> untrusted</c><00:06:05.229><c> contracts</c><00:06:05.890><c> are</c>

00:06:06.120 --> 00:06:06.130 align:start position:0%
thus assume that untrusted contracts are
 

00:06:06.130 --> 00:06:10.020 align:start position:0%
thus assume that untrusted contracts are
malicious<00:06:07.560><c> avoid</c><00:06:08.560><c> calling</c><00:06:09.040><c> do</c><00:06:09.250><c> something</c><00:06:09.760><c> or</c>

00:06:10.020 --> 00:06:10.030 align:start position:0%
malicious avoid calling do something or
 

00:06:10.030 --> 00:06:14.600 align:start position:0%
malicious avoid calling do something or
address<00:06:10.900><c> call</c><00:06:11.440><c> on</c><00:06:12.040><c> an</c><00:06:12.490><c> untrusted</c><00:06:13.240><c> contract</c>

00:06:14.600 --> 00:06:14.610 align:start position:0%
address call on an untrusted contract
 

00:06:14.610 --> 00:06:17.270 align:start position:0%
address call on an untrusted contract
the<00:06:15.610><c> key</c><00:06:15.790><c> point</c><00:06:16.060><c> is</c><00:06:16.240><c> that</c><00:06:16.270><c> after</c><00:06:16.630><c> any</c>

00:06:17.270 --> 00:06:17.280 align:start position:0%
the key point is that after any
 

00:06:17.280 --> 00:06:20.880 align:start position:0%
the key point is that after any
untrusted<00:06:18.280><c> call</c><00:06:19.110><c> assume</c><00:06:20.110><c> that</c><00:06:20.380><c> the</c><00:06:20.500><c> state</c><00:06:20.740><c> of</c>

00:06:20.880 --> 00:06:20.890 align:start position:0%
untrusted call assume that the state of
 

00:06:20.890 --> 00:06:23.540 align:start position:0%
untrusted call assume that the state of
your<00:06:21.010><c> contract</c><00:06:21.520><c> has</c><00:06:21.760><c> been</c><00:06:21.790><c> manipulated</c>

00:06:23.540 --> 00:06:23.550 align:start position:0%
your contract has been manipulated
 

00:06:23.550 --> 00:06:29.820 align:start position:0%
your contract has been manipulated
here's<00:06:24.550><c> a</c><00:06:24.669><c> diagram</c><00:06:25.180><c> to</c><00:06:25.240><c> help</c><00:06:28.500><c> there's</c><00:06:29.500><c> a</c><00:06:29.590><c> few</c>

00:06:29.820 --> 00:06:29.830 align:start position:0%
here's a diagram to help there's a few
 

00:06:29.830 --> 00:06:32.460 align:start position:0%
here's a diagram to help there's a few
things<00:06:30.070><c> here</c><00:06:30.340><c> but</c><00:06:30.520><c> let's</c><00:06:30.760><c> start</c><00:06:31.360><c> at</c><00:06:31.540><c> the</c><00:06:31.810><c> foo</c>

00:06:32.460 --> 00:06:32.470 align:start position:0%
things here but let's start at the foo
 

00:06:32.470 --> 00:06:36.330 align:start position:0%
things here but let's start at the foo
function<00:06:33.540><c> it</c><00:06:34.540><c> decrements</c><00:06:34.780><c> X</c><00:06:35.350><c> and</c><00:06:36.040><c> then</c><00:06:36.190><c> it</c>

00:06:36.330 --> 00:06:36.340 align:start position:0%
function it decrements X and then it
 

00:06:36.340 --> 00:06:40.110 align:start position:0%
function it decrements X and then it
calls<00:06:36.550><c> a</c><00:06:37.000><c> an</c><00:06:37.540><c> untrusted</c><00:06:38.200><c> contract</c><00:06:39.120><c> the</c>

00:06:40.110 --> 00:06:40.120 align:start position:0%
calls a an untrusted contract the
 

00:06:40.120 --> 00:06:42.630 align:start position:0%
calls a an untrusted contract the
fallback<00:06:40.390><c> function</c><00:06:41.140><c> of</c><00:06:41.380><c> the</c><00:06:42.160><c> untrusted</c>

00:06:42.630 --> 00:06:42.640 align:start position:0%
fallback function of the untrusted
 

00:06:42.640 --> 00:06:44.710 align:start position:0%
fallback function of the untrusted
contract<00:06:43.090><c> executes</c>

00:06:44.710 --> 00:06:44.720 align:start position:0%
contract executes
 

00:06:44.720 --> 00:06:48.220 align:start position:0%
contract executes
and<00:06:44.810><c> it</c><00:06:45.230><c> can</c><00:06:45.380><c> call</c><00:06:45.620><c> foo</c><00:06:46.540><c> this</c><00:06:47.540><c> is</c><00:06:47.750><c> an</c><00:06:47.870><c> example</c>

00:06:48.220 --> 00:06:48.230 align:start position:0%
and it can call foo this is an example
 

00:06:48.230 --> 00:06:51.910 align:start position:0%
and it can call foo this is an example
of<00:06:48.470><c> recursively</c><00:06:49.250><c> entrance</c><00:06:49.730><c> II</c><00:06:50.920><c> it's</c>

00:06:51.910 --> 00:06:51.920 align:start position:0%
of recursively entrance II it's
 

00:06:51.920 --> 00:06:54.430 align:start position:0%
of recursively entrance II it's
important<00:06:52.400><c> to</c><00:06:52.550><c> realize</c><00:06:52.910><c> that</c><00:06:53.360><c> reentrant</c><00:06:54.200><c> si</c>

00:06:54.430 --> 00:06:54.440 align:start position:0%
important to realize that reentrant si
 

00:06:54.440 --> 00:06:57.970 align:start position:0%
important to realize that reentrant si
can<00:06:55.040><c> use</c><00:06:55.570><c> any</c><00:06:56.570><c> of</c><00:06:56.810><c> the</c><00:06:56.930><c> contracts</c><00:06:57.530><c> public</c>

00:06:57.970 --> 00:06:57.980 align:start position:0%
can use any of the contracts public
 

00:06:57.980 --> 00:07:01.630 align:start position:0%
can use any of the contracts public
functions<00:06:59.200><c> meaning</c><00:07:00.200><c> an</c><00:07:00.440><c> attacker</c><00:07:00.830><c> can</c>

00:07:01.630 --> 00:07:01.640 align:start position:0%
functions meaning an attacker can
 

00:07:01.640 --> 00:07:06.810 align:start position:0%
functions meaning an attacker can
re-enter<00:07:02.380><c> using</c><00:07:03.380><c> the</c><00:07:04.280><c> function</c><00:07:04.730><c> G</c><00:07:05.000><c> or</c><00:07:05.210><c> bar</c>

00:07:06.810 --> 00:07:06.820 align:start position:0%
re-enter using the function G or bar
 

00:07:06.820 --> 00:07:11.350 align:start position:0%
re-enter using the function G or bar
this<00:07:07.820><c> is</c><00:07:08.000><c> why</c><00:07:08.150><c> after</c><00:07:08.650><c> the</c><00:07:09.650><c> untrusted</c><00:07:10.220><c> call</c><00:07:10.430><c> the</c>

00:07:11.350 --> 00:07:11.360 align:start position:0%
this is why after the untrusted call the
 

00:07:11.360 --> 00:07:14.080 align:start position:0%
this is why after the untrusted call the
contract<00:07:11.870><c> can't</c><00:07:12.350><c> assume</c><00:07:12.680><c> anything</c><00:07:13.010><c> at</c><00:07:13.640><c> all</c>

00:07:14.080 --> 00:07:14.090 align:start position:0%
contract can't assume anything at all
 

00:07:14.090 --> 00:07:21.310 align:start position:0%
contract can't assume anything at all
about<00:07:14.330><c> the</c><00:07:14.480><c> values</c><00:07:15.020><c> of</c><00:07:15.230><c> X</c><00:07:15.800><c> or</c><00:07:16.100><c> Y</c><00:07:16.400><c> a</c><00:07:19.990><c> second</c><00:07:20.990><c> tip</c>

00:07:21.310 --> 00:07:21.320 align:start position:0%
about the values of X or Y a second tip
 

00:07:21.320 --> 00:07:25.800 align:start position:0%
about the values of X or Y a second tip
is<00:07:21.560><c> to</c><00:07:22.490><c> use</c><00:07:22.520><c> sand</c><00:07:23.390><c> and</c><00:07:23.750><c> avoid</c><00:07:24.620><c> call</c><00:07:25.010><c> dot</c><00:07:25.250><c> value</c>

00:07:25.800 --> 00:07:25.810 align:start position:0%
is to use sand and avoid call dot value
 

00:07:25.810 --> 00:07:29.110 align:start position:0%
is to use sand and avoid call dot value
if<00:07:26.810><c> you've</c><00:07:27.740><c> seen</c><00:07:27.980><c> examples</c><00:07:28.160><c> of</c><00:07:28.640><c> vulnerable</c>

00:07:29.110 --> 00:07:29.120 align:start position:0%
if you've seen examples of vulnerable
 

00:07:29.120 --> 00:07:32.190 align:start position:0%
if you've seen examples of vulnerable
code<00:07:29.530><c> especially</c><00:07:30.530><c> regarding</c><00:07:31.370><c> re-entrance</c><00:07:31.910><c> e</c>

00:07:32.190 --> 00:07:32.200 align:start position:0%
code especially regarding re-entrance e
 

00:07:32.200 --> 00:07:36.940 align:start position:0%
code especially regarding re-entrance e
they<00:07:33.200><c> all</c><00:07:33.380><c> involve</c><00:07:33.860><c> call</c><00:07:34.580><c> dot</c><00:07:34.820><c> value</c><00:07:35.950><c> because</c>

00:07:36.940 --> 00:07:36.950 align:start position:0%
they all involve call dot value because
 

00:07:36.950 --> 00:07:40.440 align:start position:0%
they all involve call dot value because
using<00:07:37.490><c> sand</c><00:07:38.020><c> instead</c><00:07:39.020><c> of</c><00:07:39.320><c> call</c><00:07:39.530><c> dot</c><00:07:39.740><c> value</c>

00:07:40.440 --> 00:07:40.450 align:start position:0%
using sand instead of call dot value
 

00:07:40.450 --> 00:07:43.930 align:start position:0%
using sand instead of call dot value
does<00:07:41.450><c> not</c><00:07:41.480><c> give</c><00:07:41.870><c> the</c><00:07:42.080><c> attacker</c><00:07:42.380><c> enough</c><00:07:43.190><c> gas</c><00:07:43.520><c> to</c>

00:07:43.930 --> 00:07:43.940 align:start position:0%
does not give the attacker enough gas to
 

00:07:43.940 --> 00:07:47.800 align:start position:0%
does not give the attacker enough gas to
do<00:07:44.840><c> damage</c><00:07:45.110><c> with</c><00:07:45.290><c> reentrant</c><00:07:46.130><c> see</c><00:07:46.810><c> the</c>

00:07:47.800 --> 00:07:47.810 align:start position:0%
do damage with reentrant see the
 

00:07:47.810 --> 00:07:52.720 align:start position:0%
do damage with reentrant see the
attacker<00:07:48.080><c> only</c><00:07:48.500><c> gets</c><00:07:49.480><c> 2300</c><00:07:50.480><c> gas</c><00:07:51.669><c> with</c><00:07:52.669><c> the</c>

00:07:52.720 --> 00:07:52.730 align:start position:0%
attacker only gets 2300 gas with the
 

00:07:52.730 --> 00:07:53.890 align:start position:0%
attacker only gets 2300 gas with the
great<00:07:52.910><c> power</c><00:07:53.090><c> comes</c><00:07:53.270><c> great</c><00:07:53.690><c> responsibility</c>

00:07:53.890 --> 00:07:53.900 align:start position:0%
great power comes great responsibility
 

00:07:53.900 --> 00:07:57.990 align:start position:0%
great power comes great responsibility
and<00:07:55.150><c> that</c><00:07:56.150><c> applies</c><00:07:56.480><c> to</c><00:07:56.510><c> call</c><00:07:56.930><c> dot</c><00:07:57.169><c> value</c><00:07:57.590><c> and</c>

00:07:57.990 --> 00:07:58.000 align:start position:0%
and that applies to call dot value and
 

00:07:58.000 --> 00:08:01.630 align:start position:0%
and that applies to call dot value and
so<00:07:59.000><c> the</c><00:07:59.210><c> tip</c><00:07:59.390><c> is</c><00:07:59.600><c> to</c><00:07:59.690><c> use</c><00:07:59.900><c> scent</c><00:08:00.320><c> and</c><00:08:00.640><c> avoid</c>

00:08:01.630 --> 00:08:01.640 align:start position:0%
so the tip is to use scent and avoid
 

00:08:01.640 --> 00:08:07.510 align:start position:0%
so the tip is to use scent and avoid
call<00:08:02.030><c> dot</c><00:08:02.240><c> value</c><00:08:04.960><c> perhaps</c><00:08:05.960><c> the</c><00:08:06.169><c> most</c><00:08:06.520><c> mature</c>

00:08:07.510 --> 00:08:07.520 align:start position:0%
call dot value perhaps the most mature
 

00:08:07.520 --> 00:08:11.020 align:start position:0%
call dot value perhaps the most mature
best<00:08:07.910><c> practice</c><00:08:08.390><c> is</c><00:08:08.540><c> to</c><00:08:08.570><c> handle</c><00:08:09.229><c> errors</c><00:08:09.890><c> in</c><00:08:10.280><c> raw</c>

00:08:11.020 --> 00:08:11.030 align:start position:0%
best practice is to handle errors in raw
 

00:08:11.030 --> 00:08:14.350 align:start position:0%
best practice is to handle errors in raw
calls<00:08:11.979><c> Rock</c><00:08:12.979><c> holes</c><00:08:13.250><c> such</c><00:08:13.940><c> as</c><00:08:14.120><c> address</c>

00:08:14.350 --> 00:08:14.360 align:start position:0%
calls Rock holes such as address
 

00:08:14.360 --> 00:08:18.790 align:start position:0%
calls Rock holes such as address
thoughts<00:08:14.900><c> and</c><00:08:15.260><c> and</c><00:08:15.560><c> address</c><00:08:16.460><c> dot</c><00:08:16.760><c> call</c><00:08:17.800><c> return</c>

00:08:18.790 --> 00:08:18.800 align:start position:0%
thoughts and and address dot call return
 

00:08:18.800 --> 00:08:22.420 align:start position:0%
thoughts and and address dot call return
false<00:08:19.130><c> if</c><00:08:19.580><c> they</c><00:08:20.030><c> fail</c><00:08:20.919><c> this</c><00:08:21.919><c> is</c><00:08:22.130><c> unlike</c>

00:08:22.420 --> 00:08:22.430 align:start position:0%
false if they fail this is unlike
 

00:08:22.430 --> 00:08:25.120 align:start position:0%
false if they fail this is unlike
invoking<00:08:22.760><c> a</c><00:08:22.940><c> do</c><00:08:23.120><c> something</c><00:08:23.570><c> method</c><00:08:24.130><c> which</c>

00:08:25.120 --> 00:08:25.130 align:start position:0%
invoking a do something method which
 

00:08:25.130 --> 00:08:28.300 align:start position:0%
invoking a do something method which
propagates<00:08:25.790><c> an</c><00:08:25.940><c> exception</c><00:08:26.650><c> if</c><00:08:27.650><c> it</c><00:08:27.979><c> encounters</c>

00:08:28.300 --> 00:08:28.310 align:start position:0%
propagates an exception if it encounters
 

00:08:28.310 --> 00:08:34.360 align:start position:0%
propagates an exception if it encounters
one<00:08:30.010><c> so</c><00:08:31.010><c> the</c><00:08:31.250><c> good</c><00:08:31.400><c> example</c><00:08:32.030><c> is</c><00:08:32.240><c> to</c><00:08:33.370><c> check</c>

00:08:34.360 --> 00:08:34.370 align:start position:0%
one so the good example is to check
 

00:08:34.370 --> 00:08:36.790 align:start position:0%
one so the good example is to check
check<00:08:34.969><c> the</c><00:08:35.120><c> result</c><00:08:35.450><c> and</c><00:08:35.630><c> the</c><00:08:35.960><c> bad</c><00:08:36.110><c> example</c><00:08:36.650><c> is</c>

00:08:36.790 --> 00:08:36.800 align:start position:0%
check the result and the bad example is
 

00:08:36.800 --> 00:08:43.270 align:start position:0%
check the result and the bad example is
an<00:08:37.339><c> unchecked</c><00:08:37.820><c> send</c><00:08:38.240><c> a</c><00:08:41.860><c> tip</c><00:08:42.860><c> that</c><00:08:43.099><c> goes</c>

00:08:43.270 --> 00:08:43.280 align:start position:0%
an unchecked send a tip that goes
 

00:08:43.280 --> 00:08:46.600 align:start position:0%
an unchecked send a tip that goes
together<00:08:43.550><c> with</c><00:08:44.480><c> using</c><00:08:44.930><c> send</c><00:08:45.230><c> is</c><00:08:45.740><c> to</c><00:08:46.460><c> keep</c>

00:08:46.600 --> 00:08:46.610 align:start position:0%
together with using send is to keep
 

00:08:46.610 --> 00:08:50.950 align:start position:0%
together with using send is to keep
fallback<00:08:47.060><c> functions</c><00:08:47.510><c> simple</c><00:08:49.720><c> the</c><00:08:50.720><c> last</c>

00:08:50.950 --> 00:08:50.960 align:start position:0%
fallback functions simple the last
 

00:08:50.960 --> 00:08:53.829 align:start position:0%
fallback functions simple the last
fallback<00:08:51.410><c> function</c><00:08:52.010><c> is</c><00:08:52.250><c> advised</c><00:08:53.240><c> against</c>

00:08:53.829 --> 00:08:53.839 align:start position:0%
fallback function is advised against
 

00:08:53.839 --> 00:08:58.540 align:start position:0%
fallback function is advised against
because<00:08:54.200><c> one</c><00:08:54.770><c> it</c><00:08:55.700><c> uses</c><00:08:56.000><c> more</c><00:08:56.390><c> than</c><00:08:57.400><c> 23-hundred</c>

00:08:58.540 --> 00:08:58.550 align:start position:0%
because one it uses more than 23-hundred
 

00:08:58.550 --> 00:09:03.730 align:start position:0%
because one it uses more than 23-hundred
ass<00:09:00.100><c> second</c><00:09:01.100><c> it</c><00:09:01.370><c> asks</c><00:09:01.820><c> callers</c><00:09:02.320><c> to</c><00:09:03.320><c> break</c><00:09:03.560><c> the</c>

00:09:03.730 --> 00:09:03.740 align:start position:0%
ass second it asks callers to break the
 

00:09:03.740 --> 00:09:07.300 align:start position:0%
ass second it asks callers to break the
tip<00:09:03.920><c> of</c><00:09:04.160><c> using</c><00:09:04.519><c> sand</c><00:09:04.850><c> and</c><00:09:05.380><c> asks</c><00:09:06.380><c> them</c><00:09:06.620><c> to</c><00:09:07.130><c> use</c>

00:09:07.300 --> 00:09:07.310 align:start position:0%
tip of using sand and asks them to use
 

00:09:07.310 --> 00:09:15.370 align:start position:0%
tip of using sand and asks them to use
the<00:09:07.519><c> riskier</c><00:09:08.089><c> call</c><00:09:08.750><c> dot</c><00:09:08.990><c> value</c><00:09:09.410><c> a</c><00:09:14.079><c> call</c><00:09:15.079><c> depth</c>

00:09:15.370 --> 00:09:15.380 align:start position:0%
the riskier call dot value a call depth
 

00:09:15.380 --> 00:09:18.579 align:start position:0%
the riskier call dot value a call depth
attack<00:09:15.880><c> can</c><00:09:16.880><c> be</c><00:09:16.910><c> used</c><00:09:17.300><c> by</c><00:09:17.720><c> an</c><00:09:17.839><c> attacker</c><00:09:18.200><c> to</c>

00:09:18.579 --> 00:09:18.589 align:start position:0%
attack can be used by an attacker to
 

00:09:18.589 --> 00:09:22.740 align:start position:0%
attack can be used by an attacker to
make<00:09:19.430><c> all</c><00:09:19.670><c> of</c><00:09:19.700><c> your</c><00:09:20.149><c> contracts</c><00:09:20.660><c> calls</c><00:09:21.350><c> to</c><00:09:21.709><c> fail</c>

00:09:22.740 --> 00:09:22.750 align:start position:0%
make all of your contracts calls to fail
 

00:09:22.750 --> 00:09:25.660 align:start position:0%
make all of your contracts calls to fail
the<00:09:23.750><c> theme</c><00:09:23.930><c> the</c><00:09:24.620><c> etherium</c><00:09:24.980><c> virtual</c><00:09:25.370><c> machine</c>

00:09:25.660 --> 00:09:25.670 align:start position:0%
the theme the etherium virtual machine
 

00:09:25.670 --> 00:09:27.480 align:start position:0%
the theme the etherium virtual machine
has<00:09:25.820><c> what</c><00:09:26.029><c> the</c><00:09:26.149><c> yellow</c><00:09:26.390><c> paper</c><00:09:26.630><c> calls</c><00:09:26.959><c> a</c>

00:09:27.480 --> 00:09:27.490 align:start position:0%
has what the yellow paper calls a
 

00:09:27.490 --> 00:09:31.690 align:start position:0%
has what the yellow paper calls a
contract<00:09:28.490><c> a</c><00:09:28.910><c> message</c><00:09:29.660><c> called</c><00:09:30.290><c> slash</c><00:09:30.920><c> contract</c>

00:09:31.690 --> 00:09:31.700 align:start position:0%
contract a message called slash contract
 

00:09:31.700 --> 00:09:34.690 align:start position:0%
contract a message called slash contract
creation<00:09:32.329><c> stack</c><00:09:32.930><c> and</c><00:09:33.320><c> it</c><00:09:34.100><c> has</c><00:09:34.220><c> a</c><00:09:34.250><c> maximum</c>

00:09:34.690 --> 00:09:34.700 align:start position:0%
creation stack and it has a maximum
 

00:09:34.700 --> 00:09:38.980 align:start position:0%
creation stack and it has a maximum
depth<00:09:35.089><c> of</c><00:09:35.740><c> 1,024</c><00:09:37.120><c> an</c><00:09:38.120><c> attacker</c><00:09:38.510><c> can</c><00:09:38.810><c> make</c>

00:09:38.980 --> 00:09:38.990 align:start position:0%
depth of 1,024 an attacker can make
 

00:09:38.990 --> 00:09:41.290 align:start position:0%
depth of 1,024 an attacker can make
recursive<00:09:39.529><c> calls</c><00:09:39.769><c> to</c><00:09:40.339><c> bring</c><00:09:40.579><c> the</c><00:09:40.850><c> depth</c><00:09:41.029><c> to</c>

00:09:41.290 --> 00:09:41.300 align:start position:0%
recursive calls to bring the depth to
 

00:09:41.300 --> 00:09:45.910 align:start position:0%
recursive calls to bring the depth to
1023<00:09:42.610><c> call</c><00:09:43.610><c> your</c><00:09:43.940><c> function</c><00:09:44.410><c> which</c><00:09:45.410><c> brings</c><00:09:45.740><c> the</c>

00:09:45.910 --> 00:09:45.920 align:start position:0%
1023 call your function which brings the
 

00:09:45.920 --> 00:09:49.840 align:start position:0%
1023 call your function which brings the
depth<00:09:46.100><c> to</c><00:09:46.480><c> 1024</c><00:09:47.480><c> and</c><00:09:48.279><c> now</c><00:09:49.279><c> all</c><00:09:49.550><c> of</c><00:09:49.579><c> your</c>

00:09:49.840 --> 00:09:49.850 align:start position:0%
depth to 1024 and now all of your
 

00:09:49.850 --> 00:09:53.889 align:start position:0%
depth to 1024 and now all of your
contracts<00:09:50.360><c> calls</c><00:09:50.750><c> will</c><00:09:51.500><c> fail</c><00:09:51.769><c> in</c><00:09:52.899><c> this</c>

00:09:53.889 --> 00:09:53.899 align:start position:0%
contracts calls will fail in this
 

00:09:53.899 --> 00:09:57.519 align:start position:0%
contracts calls will fail in this
example<00:09:54.760><c> simple</c><00:09:55.760><c> example</c><00:09:56.300><c> an</c><00:09:56.510><c> attacker</c><00:09:57.260><c> can</c>

00:09:57.519 --> 00:09:57.529 align:start position:0%
example simple example an attacker can
 

00:09:57.529 --> 00:10:01.380 align:start position:0%
example simple example an attacker can
force<00:09:57.800><c> a</c><00:09:58.010><c> recipient</c><00:09:58.660><c> to</c><00:09:59.660><c> lose</c><00:09:59.839><c> their</c><00:10:00.079><c> refund</c>

00:10:01.380 --> 00:10:01.390 align:start position:0%
force a recipient to lose their refund
 

00:10:01.390 --> 00:10:03.730 align:start position:0%
force a recipient to lose their refund
so<00:10:02.390><c> the</c><00:10:02.540><c> attacker</c><00:10:02.839><c> recurse</c><00:10:03.170><c> is</c><00:10:03.350><c> to</c><00:10:03.470><c> bring</c><00:10:03.620><c> the</c>

00:10:03.730 --> 00:10:03.740 align:start position:0%
so the attacker recurse is to bring the
 

00:10:03.740 --> 00:10:07.170 align:start position:0%
so the attacker recurse is to bring the
depth<00:10:03.920><c> to</c><00:10:04.160><c> 1023</c><00:10:05.060><c> then</c><00:10:05.839><c> calls</c><00:10:06.140><c> withdraw</c><00:10:06.620><c> refund</c>

00:10:07.170 --> 00:10:07.180 align:start position:0%
depth to 1023 then calls withdraw refund
 

00:10:07.180 --> 00:10:10.060 align:start position:0%
depth to 1023 then calls withdraw refund
using<00:10:08.180><c> the</c><00:10:08.300><c> address</c><00:10:08.630><c> of</c><00:10:08.870><c> a</c><00:10:09.050><c> victim</c><00:10:09.440><c> recipient</c>

00:10:10.060 --> 00:10:10.070 align:start position:0%
using the address of a victim recipient
 

00:10:10.070 --> 00:10:17.170 align:start position:0%
using the address of a victim recipient
and<00:10:10.450><c> the</c><00:10:11.450><c> depth</c><00:10:11.660><c> is</c><00:10:11.839><c> now</c><00:10:12.050><c> at</c><00:10:13.089><c> 1024</c><00:10:15.550><c> the</c><00:10:16.550><c> refunds</c>

00:10:17.170 --> 00:10:17.180 align:start position:0%
and the depth is now at 1024 the refunds
 

00:10:17.180 --> 00:10:19.030 align:start position:0%
and the depth is now at 1024 the refunds
for<00:10:17.390><c> the</c><00:10:17.510><c> recipient</c><00:10:18.020><c> will</c><00:10:18.200><c> be</c><00:10:18.350><c> set</c><00:10:18.589><c> to</c><00:10:18.740><c> zero</c>

00:10:19.030 --> 00:10:19.040 align:start position:0%
for the recipient will be set to zero
 

00:10:19.040 --> 00:10:21.639 align:start position:0%
for the recipient will be set to zero
this<00:10:20.000><c> pointer</c><00:10:20.360><c> doesn't</c><00:10:20.630><c> work</c><00:10:20.810><c> well</c><00:10:21.200><c> to</c><00:10:21.470><c> show</c>

00:10:21.639 --> 00:10:21.649 align:start position:0%
this pointer doesn't work well to show
 

00:10:21.649 --> 00:10:28.180 align:start position:0%
this pointer doesn't work well to show
that<00:10:22.149><c> and</c><00:10:26.110><c> when</c><00:10:27.110><c> the</c><00:10:27.260><c> victim</c><00:10:27.529><c> calls</c><00:10:27.770><c> withdraw</c>

00:10:28.180 --> 00:10:28.190 align:start position:0%
that and when the victim calls withdraw
 

00:10:28.190 --> 00:10:30.579 align:start position:0%
that and when the victim calls withdraw
a<00:10:28.220><c> refund</c><00:10:28.730><c> that</c><00:10:29.570><c> the</c><00:10:29.720><c> send</c><00:10:29.930><c> will</c><00:10:30.079><c> fail</c><00:10:30.320><c> and</c>

00:10:30.579 --> 00:10:30.589 align:start position:0%
a refund that the send will fail and
 

00:10:30.589 --> 00:10:33.069 align:start position:0%
a refund that the send will fail and
then<00:10:31.010><c> when</c><00:10:31.279><c> the</c><00:10:31.399><c> victim</c><00:10:31.700><c> calls</c><00:10:31.940><c> tries</c><00:10:32.930><c> to</c>

00:10:33.069 --> 00:10:33.079 align:start position:0%
then when the victim calls tries to
 

00:10:33.079 --> 00:10:34.780 align:start position:0%
then when the victim calls tries to
withdraw<00:10:33.320><c> their</c><00:10:33.500><c> own</c><00:10:33.620><c> refund</c><00:10:34.070><c> the</c><00:10:34.430><c> refund</c>

00:10:34.780 --> 00:10:34.790 align:start position:0%
withdraw their own refund the refund
 

00:10:34.790 --> 00:10:37.120 align:start position:0%
withdraw their own refund the refund
will<00:10:34.940><c> already</c><00:10:35.180><c> be</c><00:10:35.300><c> set</c><00:10:35.570><c> to</c><00:10:35.690><c> zero</c><00:10:35.990><c> so</c><00:10:36.350><c> they</c>

00:10:37.120 --> 00:10:37.130 align:start position:0%
will already be set to zero so they
 

00:10:37.130 --> 00:10:41.170 align:start position:0%
will already be set to zero so they
can't<00:10:37.339><c> get</c><00:10:37.520><c> it</c><00:10:37.610><c> back</c><00:10:39.220><c> as</c><00:10:40.220><c> an</c><00:10:40.430><c> improvement</c><00:10:40.790><c> the</c>

00:10:41.170 --> 00:10:41.180 align:start position:0%
can't get it back as an improvement the
 

00:10:41.180 --> 00:10:43.800 align:start position:0%
can't get it back as an improvement the
return<00:10:41.449><c> value</c><00:10:41.810><c> of</c><00:10:41.990><c> send</c><00:10:42.500><c> could</c><00:10:42.800><c> be</c><00:10:42.920><c> checked</c>

00:10:43.800 --> 00:10:43.810 align:start position:0%
return value of send could be checked
 

00:10:43.810 --> 00:10:47.350 align:start position:0%
return value of send could be checked
however<00:10:44.810><c> a</c><00:10:45.199><c> preferred</c><00:10:45.829><c> solution</c><00:10:46.820><c> is</c><00:10:47.089><c> to</c><00:10:47.240><c> write</c>

00:10:47.350 --> 00:10:47.360 align:start position:0%
however a preferred solution is to write
 

00:10:47.360 --> 00:10:49.420 align:start position:0%
however a preferred solution is to write
this<00:10:47.510><c> contract</c><00:10:48.050><c> so</c><00:10:48.500><c> that</c><00:10:48.709><c> message</c><00:10:48.890><c> sender</c>

00:10:49.420 --> 00:10:49.430 align:start position:0%
this contract so that message sender
 

00:10:49.430 --> 00:10:52.689 align:start position:0%
this contract so that message sender
will<00:10:49.610><c> pull</c><00:10:49.850><c> their</c><00:10:50.120><c> refund</c><00:10:50.540><c> as</c><00:10:51.370><c> opposed</c><00:10:52.370><c> to</c><00:10:52.490><c> the</c>

00:10:52.689 --> 00:10:52.699 align:start position:0%
will pull their refund as opposed to the
 

00:10:52.699 --> 00:10:56.259 align:start position:0%
will pull their refund as opposed to the
insecure<00:10:53.240><c> contracts</c><00:10:53.779><c> approach</c><00:10:54.110><c> of</c><00:10:55.269><c> pushing</c>

00:10:56.259 --> 00:10:56.269 align:start position:0%
insecure contracts approach of pushing
 

00:10:56.269 --> 00:11:01.000 align:start position:0%
insecure contracts approach of pushing
the<00:10:56.360><c> refund</c><00:10:56.720><c> to</c><00:10:56.930><c> recipient</c><00:10:59.529><c> this</c><00:11:00.529><c> has</c><00:11:00.740><c> had</c>

00:11:01.000 --> 00:11:01.010 align:start position:0%
the refund to recipient this has had
 

00:11:01.010 --> 00:11:02.680 align:start position:0%
the refund to recipient this has had
to<00:11:01.040><c> be</c><00:11:01.190><c> a</c><00:11:01.220><c> quick</c><00:11:01.460><c> presentation</c><00:11:01.640><c> and</c><00:11:02.270><c> there's</c>

00:11:02.680 --> 00:11:02.690 align:start position:0%
to be a quick presentation and there's
 

00:11:02.690 --> 00:11:05.050 align:start position:0%
to be a quick presentation and there's
plenty<00:11:03.170><c> more</c><00:11:03.320><c> information</c><00:11:04.100><c> and</c><00:11:04.370><c> examples</c>

00:11:05.050 --> 00:11:05.060 align:start position:0%
plenty more information and examples
 

00:11:05.060 --> 00:11:06.280 align:start position:0%
plenty more information and examples
such<00:11:05.450><c> as</c><00:11:05.480><c> pull</c><00:11:05.900><c> over</c>

00:11:06.280 --> 00:11:06.290 align:start position:0%
such as pull over
 

00:11:06.290 --> 00:11:09.880 align:start position:0%
such as pull over
push<00:11:07.390><c> denial</c><00:11:08.390><c> of</c><00:11:08.540><c> service</c><00:11:08.900><c> against</c><00:11:09.260><c> contracts</c>

00:11:09.880 --> 00:11:09.890 align:start position:0%
push denial of service against contracts
 

00:11:09.890 --> 00:11:13.180 align:start position:0%
push denial of service against contracts
and<00:11:10.360><c> re-entrance</c><00:11:11.360><c> e</c><00:11:11.540><c> that</c><00:11:12.350><c> can</c><00:11:12.530><c> be</c><00:11:12.620><c> found</c><00:11:12.800><c> in</c>

00:11:13.180 --> 00:11:13.190 align:start position:0%
and re-entrance e that can be found in
 

00:11:13.190 --> 00:11:20.560 align:start position:0%
and re-entrance e that can be found in
the<00:11:13.400><c> repo</c><00:11:13.700><c> and</c><00:11:13.970><c> wiki</c><00:11:14.600><c> page</c><00:11:18.130><c> to</c><00:11:19.130><c> recap</c><00:11:19.550><c> some</c><00:11:19.910><c> of</c>

00:11:20.560 --> 00:11:20.570 align:start position:0%
the repo and wiki page to recap some of
 

00:11:20.570 --> 00:11:23.560 align:start position:0%
the repo and wiki page to recap some of
the<00:11:20.780><c> main</c><00:11:20.990><c> points</c><00:11:21.790><c> for</c><00:11:22.790><c> smart</c><00:11:23.150><c> contract</c>

00:11:23.560 --> 00:11:23.570 align:start position:0%
the main points for smart contract
 

00:11:23.570 --> 00:11:28.090 align:start position:0%
the main points for smart contract
security<00:11:24.080><c> are</c><00:11:24.790><c> prepare</c><00:11:25.790><c> for</c><00:11:26.000><c> failure</c><00:11:27.100><c> rollout</c>

00:11:28.090 --> 00:11:28.100 align:start position:0%
security are prepare for failure rollout
 

00:11:28.100 --> 00:11:33.060 align:start position:0%
security are prepare for failure rollout
carefully<00:11:29.470><c> keep</c><00:11:30.470><c> contracts</c><00:11:31.100><c> simple</c><00:11:31.550><c> and</c>

00:11:33.060 --> 00:11:33.070 align:start position:0%
carefully keep contracts simple and
 

00:11:33.070 --> 00:11:36.250 align:start position:0%
carefully keep contracts simple and
calling<00:11:34.070><c> untrusted</c><00:11:34.760><c> contracts</c><00:11:35.420><c> is</c><00:11:35.810><c> always</c>

00:11:36.250 --> 00:11:36.260 align:start position:0%
calling untrusted contracts is always
 

00:11:36.260 --> 00:11:40.270 align:start position:0%
calling untrusted contracts is always
dangerous<00:11:37.780><c> the</c><00:11:38.780><c> danger</c><00:11:39.110><c> may</c><00:11:39.290><c> seem</c><00:11:39.530><c> small</c><00:11:39.770><c> but</c>

00:11:40.270 --> 00:11:40.280 align:start position:0%
dangerous the danger may seem small but
 

00:11:40.280 --> 00:11:43.630 align:start position:0%
dangerous the danger may seem small but
if<00:11:41.150><c> an</c><00:11:41.270><c> attacker</c><00:11:41.570><c> finds</c><00:11:42.230><c> and</c><00:11:42.440><c> exploits</c><00:11:43.280><c> a</c><00:11:43.430><c> bug</c>

00:11:43.630 --> 00:11:43.640 align:start position:0%
if an attacker finds and exploits a bug
 

00:11:43.640 --> 00:11:47.430 align:start position:0%
if an attacker finds and exploits a bug
in<00:11:43.880><c> a</c><00:11:43.970><c> compiler</c><00:11:44.540><c> that</c><00:11:45.040><c> is</c><00:11:46.040><c> targeting</c><00:11:46.490><c> the</c><00:11:46.610><c> EVM</c>

00:11:47.430 --> 00:11:47.440 align:start position:0%
in a compiler that is targeting the EVM
 

00:11:47.440 --> 00:11:50.220 align:start position:0%
in a compiler that is targeting the EVM
they<00:11:48.440><c> are</c><00:11:48.560><c> likely</c><00:11:48.830><c> to</c><00:11:49.190><c> do</c><00:11:49.280><c> much</c><00:11:49.490><c> more</c><00:11:49.850><c> damage</c>

00:11:50.220 --> 00:11:50.230 align:start position:0%
they are likely to do much more damage
 

00:11:50.230 --> 00:11:55.120 align:start position:0%
they are likely to do much more damage
if<00:11:51.230><c> their</c><00:11:51.500><c> untrusted</c><00:11:52.040><c> code</c><00:11:52.120><c> is</c><00:11:53.120><c> executed</c><00:11:54.130><c> then</c>

00:11:55.120 --> 00:11:55.130 align:start position:0%
if their untrusted code is executed then
 

00:11:55.130 --> 00:11:58.690 align:start position:0%
if their untrusted code is executed then
one<00:11:55.540><c> where</c><00:11:56.540><c> they</c><00:11:57.050><c> only</c><00:11:57.230><c> have</c><00:11:57.590><c> a</c><00:11:57.830><c> compiler</c><00:11:58.280><c> bug</c>

00:11:58.690 --> 00:11:58.700 align:start position:0%
one where they only have a compiler bug
 

00:11:58.700 --> 00:12:03.670 align:start position:0%
one where they only have a compiler bug
to<00:11:59.360><c> work</c><00:11:59.570><c> with</c><00:12:01.330><c> here</c><00:12:02.330><c> are</c><00:12:02.450><c> the</c><00:12:02.480><c> links</c><00:12:02.930><c> to</c><00:12:03.650><c> a</c>

00:12:03.670 --> 00:12:03.680 align:start position:0%
to work with here are the links to a
 

00:12:03.680 --> 00:12:06.850 align:start position:0%
to work with here are the links to a
security<00:12:04.070><c> resource</c><00:12:04.610><c> of</c><00:12:04.940><c> the</c><00:12:05.540><c> community</c><00:12:05.960><c> by</c>

00:12:06.850 --> 00:12:06.860 align:start position:0%
security resource of the community by
 

00:12:06.860 --> 00:12:10.930 align:start position:0%
security resource of the community by
the<00:12:06.890><c> committee</c><00:12:07.310><c> for</c><00:12:07.730><c> the</c><00:12:08.210><c> community</c><00:12:08.660><c> I</c><00:12:09.940><c> also</c>

00:12:10.930 --> 00:12:10.940 align:start position:0%
the committee for the community I also
 

00:12:10.940 --> 00:12:12.640 align:start position:0%
the committee for the community I also
have<00:12:11.120><c> slides</c><00:12:11.390><c> regarding</c><00:12:11.810><c> denial</c><00:12:12.110><c> of</c><00:12:12.230><c> service</c>

00:12:12.640 --> 00:12:12.650 align:start position:0%
have slides regarding denial of service
 

00:12:12.650 --> 00:12:16.720 align:start position:0%
have slides regarding denial of service
and<00:12:12.920><c> pull</c><00:12:13.520><c> over</c><00:12:13.820><c> push</c><00:12:14.120><c> or</c><00:12:14.840><c> can</c><00:12:15.530><c> take</c><00:12:15.830><c> two</c>

00:12:16.720 --> 00:12:16.730 align:start position:0%
and pull over push or can take two
 

00:12:16.730 --> 00:12:20.530 align:start position:0%
and pull over push or can take two
questions<00:12:17.210><c> in</c><00:12:17.420><c> the</c><00:12:17.540><c> remaining</c><00:12:18.670><c> three</c><00:12:19.670><c> minutes</c>

00:12:20.530 --> 00:12:20.540 align:start position:0%
questions in the remaining three minutes
 

00:12:20.540 --> 00:12:27.280 align:start position:0%
questions in the remaining three minutes
any<00:12:21.440><c> questions</c><00:12:25.990><c> ok</c>

00:12:27.280 --> 00:12:27.290 align:start position:0%
any questions ok
 

00:12:27.290 --> 00:12:30.300 align:start position:0%
any questions ok
I<00:12:28.190><c> can</c><00:12:28.520><c> quickly</c><00:12:28.700><c> go</c><00:12:28.970><c> through</c><00:12:29.000><c> a</c><00:12:29.270><c> couple</c><00:12:29.810><c> more</c>

00:12:30.300 --> 00:12:30.310 align:start position:0%
I can quickly go through a couple more
 

00:12:30.310 --> 00:12:37.120 align:start position:0%
I can quickly go through a couple more
so<00:12:33.370><c> so</c><00:12:34.370><c> quickly</c><00:12:34.670><c> in</c><00:12:34.940><c> this</c><00:12:35.120><c> a</c><00:12:36.040><c> denial</c><00:12:37.040><c> of</c>

00:12:37.120 --> 00:12:37.130 align:start position:0%
so so quickly in this a denial of
 

00:12:37.130 --> 00:12:38.950 align:start position:0%
so so quickly in this a denial of
service<00:12:37.190><c> against</c><00:12:37.820><c> the</c><00:12:37.910><c> contract</c><00:12:38.420><c> there</c><00:12:38.870><c> are</c>

00:12:38.950 --> 00:12:38.960 align:start position:0%
service against the contract there are
 

00:12:38.960 --> 00:12:41.410 align:start position:0%
service against the contract there are
many<00:12:39.110><c> ways</c><00:12:40.010><c> that</c><00:12:40.070><c> pitfalls</c><00:12:41.030><c> that</c><00:12:41.090><c> you</c><00:12:41.210><c> can</c>

00:12:41.410 --> 00:12:41.420 align:start position:0%
many ways that pitfalls that you can
 

00:12:41.420 --> 00:12:44.770 align:start position:0%
many ways that pitfalls that you can
encounter<00:12:41.720><c> them</c><00:12:42.370><c> one</c><00:12:43.370><c> is</c><00:12:43.580><c> an</c><00:12:44.000><c> unexpected</c>

00:12:44.770 --> 00:12:44.780 align:start position:0%
encounter them one is an unexpected
 

00:12:44.780 --> 00:12:46.660 align:start position:0%
encounter them one is an unexpected
throw<00:12:45.020><c> which</c><00:12:45.290><c> is</c><00:12:45.320><c> what</c><00:12:45.620><c> this</c><00:12:45.740><c> code</c><00:12:46.490><c> example</c>

00:12:46.660 --> 00:12:46.670 align:start position:0%
throw which is what this code example
 

00:12:46.670 --> 00:12:50.110 align:start position:0%
throw which is what this code example
here<00:12:47.180><c> is</c><00:12:47.240><c> about</c><00:12:47.560><c> but</c><00:12:48.560><c> hitting</c><00:12:49.520><c> the</c><00:12:49.730><c> block</c><00:12:49.910><c> s</c>

00:12:50.110 --> 00:12:50.120 align:start position:0%
here is about but hitting the block s
 

00:12:50.120 --> 00:12:52.390 align:start position:0%
here is about but hitting the block s
limit<00:12:50.450><c> is</c><00:12:50.570><c> another</c><00:12:50.840><c> example</c><00:12:51.400><c> iterating</c>

00:12:52.390 --> 00:12:52.400 align:start position:0%
limit is another example iterating
 

00:12:52.400 --> 00:12:53.800 align:start position:0%
limit is another example iterating
through<00:12:52.430><c> an</c><00:12:52.700><c> unbounded</c><00:12:53.180><c> to</c><00:12:53.330><c> raise</c><00:12:53.480><c> another</c>

00:12:53.800 --> 00:12:53.810 align:start position:0%
through an unbounded to raise another
 

00:12:53.810 --> 00:12:56.470 align:start position:0%
through an unbounded to raise another
example<00:12:54.820><c> misunderstanding</c><00:12:55.820><c> gas</c><00:12:55.970><c> refunds</c>

00:12:56.470 --> 00:12:56.480 align:start position:0%
example misunderstanding gas refunds
 

00:12:56.480 --> 00:13:01.300 align:start position:0%
example misunderstanding gas refunds
will<00:12:57.050><c> also</c><00:12:57.380><c> cause</c><00:12:58.370><c> the</c><00:12:58.520><c> same</c><00:12:58.730><c> issue</c><00:13:00.010><c> so</c><00:13:01.010><c> in</c>

00:13:01.300 --> 00:13:01.310 align:start position:0%
will also cause the same issue so in
 

00:13:01.310 --> 00:13:06.310 align:start position:0%
will also cause the same issue so in
this<00:13:01.490><c> example</c><00:13:02.060><c> contract</c><00:13:03.460><c> the</c><00:13:04.460><c> the</c><00:13:05.240><c> line</c><00:13:06.110><c> with</c>

00:13:06.310 --> 00:13:06.320 align:start position:0%
this example contract the the line with
 

00:13:06.320 --> 00:13:08.800 align:start position:0%
this example contract the the line with
the<00:13:06.410><c> throw</c><00:13:06.680><c> means</c><00:13:07.490><c> that</c><00:13:07.820><c> a</c><00:13:08.060><c> current</c><00:13:08.450><c> leader</c>

00:13:08.800 --> 00:13:08.810 align:start position:0%
the throw means that a current leader
 

00:13:08.810 --> 00:13:12.310 align:start position:0%
the throw means that a current leader
that<00:13:09.440><c> refuses</c><00:13:09.980><c> payment</c><00:13:10.430><c> will</c><00:13:11.420><c> permanently</c><00:13:11.930><c> be</c>

00:13:12.310 --> 00:13:12.320 align:start position:0%
that refuses payment will permanently be
 

00:13:12.320 --> 00:13:13.429 align:start position:0%
that refuses payment will permanently be
the<00:13:12.470><c> leader</c>

00:13:13.429 --> 00:13:13.439 align:start position:0%
the leader
 

00:13:13.439 --> 00:13:16.460 align:start position:0%
the leader
and<00:13:14.179><c> the</c><00:13:15.179><c> throw</c><00:13:15.419><c> cannot</c><00:13:15.749><c> be</c><00:13:15.899><c> removed</c><00:13:16.199><c> in</c><00:13:16.349><c> this</c>

00:13:16.460 --> 00:13:16.470 align:start position:0%
and the throw cannot be removed in this
 

00:13:16.470 --> 00:13:20.509 align:start position:0%
and the throw cannot be removed in this
case<00:13:16.829><c> because</c><00:13:17.579><c> otherwise</c><00:13:18.109><c> some</c><00:13:19.109><c> other</c><00:13:19.519><c> person</c>

00:13:20.509 --> 00:13:20.519 align:start position:0%
case because otherwise some other person
 

00:13:20.519 --> 00:13:24.229 align:start position:0%
case because otherwise some other person
can<00:13:20.939><c> do</c><00:13:21.869><c> a</c><00:13:21.899><c> call</c><00:13:22.679><c> depth</c><00:13:23.039><c> attack</c><00:13:23.429><c> against</c><00:13:23.939><c> bid</c>

00:13:24.229 --> 00:13:24.239 align:start position:0%
can do a call depth attack against bid
 

00:13:24.239 --> 00:13:27.349 align:start position:0%
can do a call depth attack against bid
and<00:13:24.799><c> what</c><00:13:25.799><c> that</c><00:13:25.979><c> means</c><00:13:26.279><c> is</c><00:13:26.609><c> that</c><00:13:26.669><c> they</c><00:13:27.149><c> will</c>

00:13:27.349 --> 00:13:27.359 align:start position:0%
and what that means is that they will
 

00:13:27.359 --> 00:13:29.539 align:start position:0%
and what that means is that they will
get<00:13:27.569><c> to</c><00:13:27.629><c> be</c><00:13:27.899><c> the</c><00:13:28.019><c> current</c><00:13:28.379><c> leader</c><00:13:28.619><c> without</c>

00:13:29.539 --> 00:13:29.549 align:start position:0%
get to be the current leader without
 

00:13:29.549 --> 00:13:32.899 align:start position:0%
get to be the current leader without
having<00:13:29.939><c> had</c><00:13:30.089><c> to</c><00:13:30.269><c> pay</c><00:13:30.449><c> the</c><00:13:30.779><c> previous</c><00:13:31.289><c> leader</c><00:13:31.909><c> so</c>

00:13:32.899 --> 00:13:32.909 align:start position:0%
having had to pay the previous leader so
 

00:13:32.909 --> 00:13:34.279 align:start position:0%
having had to pay the previous leader so
in<00:13:33.029><c> this</c><00:13:33.119><c> example</c><00:13:33.299><c> you</c><00:13:33.629><c> can</c><00:13:33.869><c> just</c><00:13:34.049><c> remove</c>

00:13:34.279 --> 00:13:34.289 align:start position:0%
in this example you can just remove
 

00:13:34.289 --> 00:13:39.079 align:start position:0%
in this example you can just remove
throw<00:13:34.619><c> and</c><00:13:35.659><c> for</c><00:13:36.659><c> the</c><00:13:36.749><c> final</c><00:13:37.609><c> tip</c><00:13:38.609><c> that</c><00:13:38.849><c> we</c><00:13:38.970><c> only</c>

00:13:39.079 --> 00:13:39.089 align:start position:0%
throw and for the final tip that we only
 

00:13:39.089 --> 00:13:42.319 align:start position:0%
throw and for the final tip that we only
have<00:13:39.269><c> time</c><00:13:39.419><c> for</c><00:13:39.479><c> here</c><00:13:39.959><c> is</c><00:13:40.309><c> to</c><00:13:41.309><c> change</c><00:13:42.059><c> this</c>

00:13:42.319 --> 00:13:42.329 align:start position:0%
have time for here is to change this
 

00:13:42.329 --> 00:13:47.989 align:start position:0%
have time for here is to change this
into<00:13:42.689><c> a</c><00:13:42.839><c> pull</c><00:13:43.109><c> over</c><00:13:43.259><c> push</c><00:13:44.629><c> system</c><00:13:45.629><c> and</c><00:13:46.369><c> so</c><00:13:47.369><c> the</c>

00:13:47.989 --> 00:13:47.999 align:start position:0%
into a pull over push system and so the
 

00:13:47.999 --> 00:13:51.589 align:start position:0%
into a pull over push system and so the
left<00:13:48.179><c> side</c><00:13:48.299><c> is</c><00:13:48.749><c> the</c><00:13:49.549><c> auction</c><00:13:50.549><c> contract</c><00:13:51.329><c> that</c>

00:13:51.589 --> 00:13:51.599 align:start position:0%
left side is the auction contract that
 

00:13:51.599 --> 00:13:54.739 align:start position:0%
left side is the auction contract that
was<00:13:51.749><c> shown</c><00:13:51.989><c> this</c><00:13:52.439><c> couple</c><00:13:53.069><c> of</c><00:13:53.099><c> slides</c><00:13:53.369><c> ago</c><00:13:53.749><c> this</c>

00:13:54.739 --> 00:13:54.749 align:start position:0%
was shown this couple of slides ago this
 

00:13:54.749 --> 00:13:57.739 align:start position:0%
was shown this couple of slides ago this
time<00:13:55.019><c> instead</c><00:13:55.379><c> of</c><00:13:55.499><c> doing</c><00:13:55.589><c> a</c><00:13:56.069><c> sent</c><00:13:56.459><c> to</c><00:13:56.879><c> the</c>

00:13:57.739 --> 00:13:57.749 align:start position:0%
time instead of doing a sent to the
 

00:13:57.749 --> 00:14:00.079 align:start position:0%
time instead of doing a sent to the
recipient<00:13:58.079><c> it</c><00:13:58.859><c> just</c><00:13:59.189><c> the</c><00:13:59.459><c> contract</c><00:13:59.879><c> just</c>

00:14:00.079 --> 00:14:00.089 align:start position:0%
recipient it just the contract just
 

00:14:00.089 --> 00:14:03.889 align:start position:0%
recipient it just the contract just
keeps<00:14:00.299><c> track</c><00:14:00.569><c> of</c><00:14:00.629><c> the</c><00:14:00.929><c> refunds</c><00:14:01.319><c> that</c><00:14:02.749><c> that</c><00:14:03.749><c> are</c>

00:14:03.889 --> 00:14:03.899 align:start position:0%
keeps track of the refunds that that are
 

00:14:03.899 --> 00:14:06.319 align:start position:0%
keeps track of the refunds that that are
owed<00:14:04.079><c> to</c><00:14:04.619><c> whoever</c><00:14:04.919><c> the</c><00:14:05.189><c> highest</c><00:14:05.489><c> bidder</c><00:14:06.119><c> is</c>

00:14:06.319 --> 00:14:06.329 align:start position:0%
owed to whoever the highest bidder is
 

00:14:06.329 --> 00:14:10.389 align:start position:0%
owed to whoever the highest bidder is
and<00:14:07.099><c> then</c><00:14:08.099><c> on</c><00:14:08.249><c> the</c><00:14:08.339><c> right</c><00:14:08.519><c> side</c><00:14:08.789><c> is</c><00:14:09.149><c> the</c><00:14:09.349><c> pull</c>

00:14:10.389 --> 00:14:10.399 align:start position:0%
and then on the right side is the pull
 

00:14:10.399 --> 00:14:13.849 align:start position:0%
and then on the right side is the pull
method<00:14:11.399><c> where</c><00:14:12.149><c> everything</c><00:14:13.019><c> works</c><00:14:13.229><c> based</c><00:14:13.619><c> off</c>

00:14:13.849 --> 00:14:13.859 align:start position:0%
method where everything works based off
 

00:14:13.859 --> 00:14:18.199 align:start position:0%
method where everything works based off
message<00:14:14.369><c> sender</c><00:14:14.819><c> and</c><00:14:15.949><c> by</c><00:14:16.949><c> doing</c><00:14:17.159><c> this</c><00:14:17.399><c> an</c>

00:14:18.199 --> 00:14:18.209 align:start position:0%
message sender and by doing this an
 

00:14:18.209 --> 00:14:19.849 align:start position:0%
message sender and by doing this an
attacker<00:14:18.539><c> can</c><00:14:18.779><c> basically</c><00:14:19.169><c> only</c><00:14:19.589><c> attack</c>

00:14:19.849 --> 00:14:19.859 align:start position:0%
attacker can basically only attack
 

00:14:19.859 --> 00:14:35.380 align:start position:0%
attacker can basically only attack
themselves<00:14:22.399><c> so</c><00:14:24.919><c> that's</c><00:14:25.919><c> it</c>

00:14:35.380 --> 00:14:35.390 align:start position:0%
 
 

00:14:35.390 --> 00:14:44.830 align:start position:0%
 
you

00:14:44.830 --> 00:14:44.840 align:start position:0%
 
 

00:14:44.840 --> 00:14:46.900 align:start position:0%
 
you

