The reference for what I'll say here is Silverman's The arithmetic of elliptic curves, ch. 2, § 2.
Let $C_1, C_2$ be two elliptic curves, $\Phi : C_1 \to C_2$ a non trivial morphism of algebraic projective curves and $P\in C_1$ a point. From that, Silverman defines the index of ramification of $\Phi$ at $P$ and denotes $e_\Phi(P)$ to be $$e_\Phi(P) := \mathrm{ord}_P(\Phi^* t_{\Phi(P)}),$$ where $t_{\Phi(P)}\in K(C_2)$ is a uniformiser at $\Phi(P)$.
I have two problems: the first is to connect this definition of the ramification index to the general theory of ramification in Dedekind rings; the second is to derive the following identity from the general theory: for all point $Q\in C_2$, the equality $\star$ $$\sum_{P\in \Phi^{-1}(Q)} e_\Phi(P) = \deg(\Phi)$$ holds. I think I solved the first problem but not the second and I get contradictive results.
First problem
Let $$A = \Phi^* K[C_2]_{\Phi(P)}.$$ Since $K[C_2]_{\Phi(P)}$ is Dedekind, $A$ is Dedekind as well since $\Phi^*$ is an injective ring homomorphism and is therefore a ring isomorphism on its image. Note that since $K[C_2]_{\Phi(P)}$ is a local ring with only one maximal ideal $\mathfrak{m}_{\Phi(P)}$, the ring $A$ is local as well with only maximal ideal $\Phi^* \mathfrak{m}_{\Phi(P)}$. Since $A$ is a Dedekind ring, its maximal ideal is also its only prime ideal.
Now let $$B = K[C_1]_P.$$ This ring is a Dedekind local ring with maximal ideal $\mathfrak{m}_P$. We have an inclusion $$A\subset B.$$ Indeed, if $x\in K[C_2]_{\Phi(P)}$ is well defined at $\Phi(P)$, then $\Phi^* x := x\circ \Phi$ is automatically well defined at $P$.
Therefore $A\subset B$ is a tower of Dedekind rings and the so-called index of ramification of $\Phi$ at $P$ can be seen as the index of ramification (in the sense of the ramification theory in Dedekind rings) of the prime ideal $\mathfrak{m}_P$ over $A$. Indeed, the Dedekind rings $A$ and $B$ both only have one prime ideal, therefore the decomposition of $\Phi^*\mathfrak{m}_{\Phi(P)}$ must be of the form $\mathfrak{m}_P^e$ for some integer $e$.
Second problem
Now let's try to derive the formula $\star$ for a given point $Q\in C_2$. A well-known equality from ramification theory in Dedekind rings is that if $\mathfrak{p}$ is a prime ideal in $A$, then $$\sum_{\mathfrak{P}|\mathfrak{p}} e_{\mathfrak{P}/\mathfrak{p}} f_{\mathfrak{P}/\mathfrak{p}} = [\mathrm{Frac}(B) : \mathrm{Frac}(A)],$$ where $e_{\mathfrak{P}/\mathfrak{p}}$ is the ramification index of $\mathfrak{P}$ over $\mathfrak{p}$ and $f_{\mathfrak{P}/\mathfrak{p}}$ is the residual degree. First, here we have $[\mathrm{Frac}(B) : \mathrm{Frac}(A)] = \mathrm{deg}(\Phi)$. Second, with that being said and what I wrote in the previous section, necessarily $\mathfrak{p} = \mathfrak{m}_{\Phi(P)}$, $\mathfrak{P} = \mathfrak{m}_P$ and the equality yields $$e_\Phi(P)\cdot f_{\mathfrak{m}_{\Phi(P)}/\mathfrak{m}_P} = \mathrm{deg}(\Phi),$$ which contradicts the equality $\star$ given by Silverman.
Could you explain what I did wrong? Thanks a lot.
You don't need to go to local rings. You can work just with global fields. See my answer at order of kernel of surjection between curves is equal to separate degree for details.